mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +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:
@@ -450,13 +450,12 @@ typedef struct ViewOptions
|
||||
|
||||
/*
|
||||
* RelationIsMapped
|
||||
* True if the relation uses the relfilenode map.
|
||||
*
|
||||
* NB: this is only meaningful for relkinds that have storage, else it
|
||||
* will misleadingly say "true".
|
||||
* True if the relation uses the relfilenode map. Note multiple eval
|
||||
* of argument!
|
||||
*/
|
||||
#define RelationIsMapped(relation) \
|
||||
((relation)->rd_rel->relfilenode == InvalidOid)
|
||||
(RELKIND_HAS_STORAGE((relation)->rd_rel->relkind) && \
|
||||
((relation)->rd_rel->relfilenode == InvalidOid))
|
||||
|
||||
/*
|
||||
* RelationOpenSmgr
|
||||
|
||||
Reference in New Issue
Block a user