pgsql: Don't create relfilenode for relations without storage

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Don't create relfilenode for relations without storage
Date: 2019-01-04 18:04:18
Message-ID: E1gfTpS-0000cr-2M@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/807ae415c54628ade937cb209f0fc9913e6b0cf5

Modified Files
--------------
src/backend/catalog/heap.c | 32 +++++++++++-------------------
src/backend/utils/cache/relcache.c | 4 ++++
src/include/catalog/catversion.h | 2 +-
src/include/utils/rel.h | 9 ++++-----
src/test/regress/expected/sanity_check.out | 9 +++++++++
src/test/regress/sql/sanity_check.sql | 6 ++++++
6 files changed, 36 insertions(+), 26 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Andres Freund 2019-01-04 20:39:26 Re: pgsql: Remove WITH OIDS support, change oid catalog column visibility.
Previous Message Alvaro Herrera 2019-01-04 17:42:22 pgsql: Rename macro to RELKIND_HAS_STORAGE