Re: pgsql: Remove pqsignal() from libpq's official exports list.

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Christoph Berg <myon@debian.org>, Tom Lane <tgl@sss.pgh.pa.us>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2019-10-07T06:59:16Z
Lists: pgsql-hackers
On Fri, Oct 04, 2019 at 11:56:31AM +0200, Christoph Berg wrote:
> This is starting to hurt in several places:
> 
> 04 11:41 <magnush> mha@xindi:~$ psql
> 04 11:41 <magnush> /usr/lib/postgresql/9.2/bin/psql: symbol lookup error:
>                    /usr/lib/postgresql/9.2/bin/psql: undefined symbol: pqsignal
> 
> pg_repack linked against libpq5 11 breaks with libpq5 12:

Ouch.  So that's commit f7ab802.  I agree that this is not cool, and
libpq so version is not likely going to be bumped up (if that happens
I have code I could wipe out).  Could we reconsider this decision?  It
seems to me that we should not silently break things.
--
Michael

Commits

  1. Put back pqsignal() as an exported libpq symbol.

  2. Remove pqsignal() from libpq's official exports list.

  3. Build src/port files as a library with -fPIC, and use that in libpq.

  4. Use SA_RESTART for all signals, including SIGALRM.

  5. Move pqsignal() to libpgport.