pgsql: Further cleanup of client dependencies on src/include/cataloghe - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Further cleanup of client dependencies on src/include/cataloghe
Date
Msg-id E1f5bi2-0001SP-4y@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Further cleanup of client dependencies on src/include/catalog headers.

In commit 9c0a0de4c, I'd failed to notice that catalog/catalog.h
should also be considered a frontend-unsafe header, because it includes
(and needs) the full form of pg_class.h, not to mention relcache.h.
However, various frontend code was depending on it to get
TABLESPACE_VERSION_DIRECTORY, so refactoring of some sort is called for.

The cleanest answer seems to be to move TABLESPACE_VERSION_DIRECTORY,
as well as the OIDCHARS symbol, to common/relpath.h.  Do that, and mop up
inclusions as necessary.  (I found that quite a few current users of
catalog/catalog.h don't seem to need it at all anymore, apparently as a
result of the refactorings that created common/relpath.[hc].  And
initdb.c needed it only as a route to pg_class_d.h.)

Discussion: https://postgr.es/m/6629.1523294509@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/af1a949109d8212711df943c053b1038c0afdae1

Modified Files
--------------
contrib/pageinspect/rawpage.c          |  1 -
contrib/pg_prewarm/pg_prewarm.c        |  1 -
src/backend/access/index/indexam.c     |  1 -
src/backend/access/rmgrdesc/smgrdesc.c |  1 -
src/backend/access/rmgrdesc/xactdesc.c |  1 -
src/backend/access/transam/xact.c      |  1 -
src/backend/access/transam/xlogfuncs.c |  1 -
src/backend/access/transam/xlogutils.c |  1 -
src/backend/catalog/storage.c          |  1 -
src/backend/commands/vacuumlazy.c      |  1 -
src/backend/replication/basebackup.c   |  1 -
src/backend/storage/file/fd.c          |  1 -
src/backend/storage/file/reinit.c      |  1 -
src/backend/storage/smgr/md.c          |  1 -
src/bin/initdb/initdb.c                |  2 +-
src/bin/pg_rewind/copy_fetch.c         |  2 --
src/bin/pg_rewind/filemap.c            |  1 -
src/bin/pg_rewind/libpq_fetch.c        |  1 -
src/common/relpath.c                   |  1 -
src/include/catalog/catalog.h          |  9 ---------
src/include/common/relpath.h           | 16 ++++++++++++++++
21 files changed, 17 insertions(+), 29 deletions(-)


pgsql-committers by date:

Previous
From: Magnus Hagander
Date:
Subject: pgsql: catversion bump for online-checksums revert
Next
From: Tom Lane
Date:
Subject: pgsql: Make reformat_dat_file.pl preserve all blank lines.