]> granicus.if.org Git - postgresql/commit
Further cleanup of client dependencies on src/include/catalog headers.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 9 Apr 2018 18:39:58 +0000 (14:39 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 9 Apr 2018 18:39:58 +0000 (14:39 -0400)
commitaf1a949109d8212711df943c053b1038c0afdae1
tree3d532e1bcd3ce3dfd1fa7dbb41480e25d342981e
parentf5543d47bcb2fee2ab69220f51e2078c11e19843
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
21 files changed:
contrib/pageinspect/rawpage.c
contrib/pg_prewarm/pg_prewarm.c
src/backend/access/index/indexam.c
src/backend/access/rmgrdesc/smgrdesc.c
src/backend/access/rmgrdesc/xactdesc.c
src/backend/access/transam/xact.c
src/backend/access/transam/xlogfuncs.c
src/backend/access/transam/xlogutils.c
src/backend/catalog/storage.c
src/backend/commands/vacuumlazy.c
src/backend/replication/basebackup.c
src/backend/storage/file/fd.c
src/backend/storage/file/reinit.c
src/backend/storage/smgr/md.c
src/bin/initdb/initdb.c
src/bin/pg_rewind/copy_fetch.c
src/bin/pg_rewind/filemap.c
src/bin/pg_rewind/libpq_fetch.c
src/common/relpath.c
src/include/catalog/catalog.h
src/include/common/relpath.h