Re: Let's stop with the retail rebuilds of src/port/ files already
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2018-09-28T18:59:58Z
Lists: pgsql-hackers
I wrote: > Now, if we go forward with that solution, there will be issues with > some other things that libpq exports without having defined itself: > src/backend/utils/mb/wchar.c: > pg_utf_mblen > src/backend/utils/mb/encnames.c: > pg_encoding_to_char > pg_char_to_encoding > pg_valid_server_encoding > pg_valid_server_encoding_id > What I was thinking of proposing was to move those two files out of the > backend and into src/common/, thereby normalizing their status as > modules available in both frontend and backend, and removing the need > for a special build rule for them in libpq. (initdb could be simplified > too.) Per this discovery, we'd need to also remove these symbols from > libpq's exports list, meaning that clients *must* get them from -lpgcommon > not from libpq. After further study I've concluded that moving those two files would be more neatnik-ism than is justified. While it'd get rid of the symlink-a-source-file technique in libpq, there'd still be other occurrences of that in our tree, so the actual cleanup benefit seems pretty limited. And while I'm prepared to believe that nobody outside PG uses pqsignal() or should do so, it's a little harder to make that case for the encnames.c functions; so the risk of causing problems seems noticeably greater. Accordingly, I cleaned up the usage of the existing src/common/ files but didn't move anything around. I plan to stop here unless the buildfarm shows more issues. regards, tom lane
Commits
-
Build src/common files as a library with -fPIC.
- 7143b3e82136 12.0 landed
-
Remove pqsignal() from libpq's official exports list.
- f7ab80285520 12.0 landed
-
Build src/port files as a library with -fPIC, and use that in libpq.
- ea53100d5671 12.0 landed