pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Further cleanup of client dependencies on src/include/catalog he
Date: Mon, 09 Apr 2018 18:40:06 +0000
Message-ID: <E1f5bi2-0001SP-4y@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1f5bi2-0001SP-4y@gemulon.postgresql.org>
Permalink:  ../E1f5bi2-0001SP-4y@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1f5bi2-0001SP-4y@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Further cleanup of client dependencies on src/include/catalog he
  In-Reply-To: <E1f5bi2-0001SP-4y@gemulon.postgresql.org>
  References: <E1f5bi2-0001SP-4y@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox