mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Don't create relfilenode for relations without storage
Some relation kinds had relfilenode set to some non-zero value, but apparently the actual files did not really exist because creation was prevented elsewhere. Get rid of the phony pg_class.relfilenode values. Catversion bumped, but only because the sanity_test check will fail if run in a system initdb'd with the previous version. Reviewed-by: Kyotaro HORIGUCHI, Michael Paquier Discussion: https://postgr.es/m/20181206215552.fm2ypuxq6nhpwjuc@alvherre.pgsql
This commit is contained in:
4
src/backend/utils/cache/relcache.c
vendored
4
src/backend/utils/cache/relcache.c
vendored
@ -1253,6 +1253,10 @@ RelationBuildDesc(Oid targetRelId, bool insertIt)
|
||||
static void
|
||||
RelationInitPhysicalAddr(Relation relation)
|
||||
{
|
||||
/* these relations kinds never have storage */
|
||||
if (!RELKIND_HAS_STORAGE(relation->rd_rel->relkind))
|
||||
return;
|
||||
|
||||
if (relation->rd_rel->reltablespace)
|
||||
relation->rd_node.spcNode = relation->rd_rel->reltablespace;
|
||||
else
|
||||
|
Reference in New Issue
Block a user