pgsql: Update comment

2022-02-10 Thread Peter Eisentraut
Update comment Update a comment that assumed that libc collations don't support versioning. Also improve an adjacent error message a bit. Branch -- master Details --- https://git.postgresql.org/pg/commitdiff/f5744f1d1e3588b4c782bcad44e8da9c056eb67f Modified Files -- src/bac

pgsql: psql: Rename results to result when only a single one is meant

2022-02-10 Thread Peter Eisentraut
psql: Rename results to result when only a single one is meant This makes the naming more consistent with the libpq API and the rest of the code, and makes actually supporting multiple result sets in the future less confusing. Discussion: https://www.postgresql.org/message-id/flat/db72fb98-9b43-

pgsql: Remove unnecessary resetPQExpBuffer call

2022-02-10 Thread Peter Eisentraut
Remove unnecessary resetPQExpBuffer call Oversight in e2c52beecdea152ca680a22ef35c6a7da55aa30f. Author: Julien Rouhaud Reviewed-by: Nathan Bossart Discussion: https://www.postgresql.org/message-id/flat/20220209025007.eogz2aivcnvw46ym%40jrouhaud Branch -- master Details --- https://gi

pgsql: Set SNI ClientHello extension to localhost in tests

2022-02-10 Thread Daniel Gustafsson
Set SNI ClientHello extension to localhost in tests The connection strings in the SSL client tests were using the host set up from Cluster.pm which is a temporary pathname. When SNI is enabled we pass the host to OpenSSL in order to set the server name indication ClientHello extension via SSL_set_

pgsql: Set SNI ClientHello extension to localhost in tests

2022-02-10 Thread Daniel Gustafsson
Set SNI ClientHello extension to localhost in tests The connection strings in the SSL client tests were using the host set up from Cluster.pm which is a temporary pathname. When SNI is enabled we pass the host to OpenSSL in order to set the server name indication ClientHello extension via SSL_set_

pgsql: Remove server support for old BASE_BACKUP command syntax.

2022-02-10 Thread Robert Haas
Remove server support for old BASE_BACKUP command syntax. Commit 0ba281cb4bf9f5f65529dfa4c8282abb734dd454 added a new syntax for the BASE_BACKUP command, with extensible options, but maintained support for the legacy syntax. This isn't important for PostgreSQL, where pg_basebackup works with older

pgsql: Make timeout.c more robust against missed timer interrupts.

2022-02-10 Thread Tom Lane
Make timeout.c more robust against missed timer interrupts. Commit 09cf1d522 taught schedule_alarm() to not do anything if the next requested event is after when we expect the next interrupt to fire. However, if somehow an interrupt gets lost, we'll continue to not do anything indefinitely, even

pgsql: Make timeout.c more robust against missed timer interrupts.

2022-02-10 Thread Tom Lane
Make timeout.c more robust against missed timer interrupts. Commit 09cf1d522 taught schedule_alarm() to not do anything if the next requested event is after when we expect the next interrupt to fire. However, if somehow an interrupt gets lost, we'll continue to not do anything indefinitely, even

pgsql: Remove server support for the previous base backup protocol.

2022-02-10 Thread Robert Haas
Remove server support for the previous base backup protocol. Commit cc333f32336f5146b75190f57ef587dff225f565 added a new COPY sub-protocol for taking base backups, but retained support for the previous protocol. For the same reasons articulated in the message for commit 9cd28c2e5f11dfeef64a14035b8

pgsql: Logical decoding of sequences

2022-02-10 Thread Tomas Vondra
Logical decoding of sequences This extends the logical decoding to also decode sequence increments. We differentiate between sequences created in the current (in-progress) transaction, and sequences created earlier. This mixed behavior is necessary because while sequences are not transactional (in

pgsql: Use gendef instead of pexports for building windows .def files

2022-02-10 Thread Andrew Dunstan
Use gendef instead of pexports for building windows .def files Modern msys systems lack pexports but have gendef instead, so use that. Discussion: https://postgr.es/m/3ccde7a9-e4f9-e194-30e0-0936e6ad6...@dunslane.net Backpatch to release 9.4 to enable building with perl on older branches. Befor

pgsql: Use gendef instead of pexports for building windows .def files

2022-02-10 Thread Andrew Dunstan
Use gendef instead of pexports for building windows .def files Modern msys systems lack pexports but have gendef instead, so use that. Discussion: https://postgr.es/m/3ccde7a9-e4f9-e194-30e0-0936e6ad6...@dunslane.net Backpatch to release 9.4 to enable building with perl on older branches. Befor

pgsql: Use gendef instead of pexports for building windows .def files

2022-02-10 Thread Andrew Dunstan
Use gendef instead of pexports for building windows .def files Modern msys systems lack pexports but have gendef instead, so use that. Discussion: https://postgr.es/m/3ccde7a9-e4f9-e194-30e0-0936e6ad6...@dunslane.net Backpatch to release 9.4 to enable building with perl on older branches. Befor

pgsql: Use gendef instead of pexports for building windows .def files

2022-02-10 Thread Andrew Dunstan
Use gendef instead of pexports for building windows .def files Modern msys systems lack pexports but have gendef instead, so use that. Discussion: https://postgr.es/m/3ccde7a9-e4f9-e194-30e0-0936e6ad6...@dunslane.net Backpatch to release 9.4 to enable building with perl on older branches. Befor

pgsql: Use gendef instead of pexports for building windows .def files

2022-02-10 Thread Andrew Dunstan
Use gendef instead of pexports for building windows .def files Modern msys systems lack pexports but have gendef instead, so use that. Discussion: https://postgr.es/m/3ccde7a9-e4f9-e194-30e0-0936e6ad6...@dunslane.net Backpatch to release 9.4 to enable building with perl on older branches. Befor

pgsql: Use gendef instead of pexports for building windows .def files

2022-02-10 Thread Andrew Dunstan
Use gendef instead of pexports for building windows .def files Modern msys systems lack pexports but have gendef instead, so use that. Discussion: https://postgr.es/m/3ccde7a9-e4f9-e194-30e0-0936e6ad6...@dunslane.net Backpatch to release 9.4 to enable building with perl on older branches. Befor

pgsql: Use gendef instead of pexports for building windows .def files

2022-02-10 Thread Andrew Dunstan
Use gendef instead of pexports for building windows .def files Modern msys systems lack pexports but have gendef instead, so use that. Discussion: https://postgr.es/m/3ccde7a9-e4f9-e194-30e0-0936e6ad6...@dunslane.net Backpatch to release 9.4 to enable building with perl on older branches. Befor

pgsql: Use gendef instead of pexports for building windows .def files

2022-02-10 Thread Andrew Dunstan
Use gendef instead of pexports for building windows .def files Modern msys systems lack pexports but have gendef instead, so use that. Discussion: https://postgr.es/m/3ccde7a9-e4f9-e194-30e0-0936e6ad6...@dunslane.net Backpatch to release 9.4 to enable building with perl on older branches. Befor

pgsql: Use gendef instead of pexports for building windows .def files

2022-02-10 Thread Andrew Dunstan
Use gendef instead of pexports for building windows .def files Modern msys systems lack pexports but have gendef instead, so use that. Discussion: https://postgr.es/m/3ccde7a9-e4f9-e194-30e0-0936e6ad6...@dunslane.net Backpatch to release 9.4 to enable building with perl on older branches. Befor

Re: pgsql: TAP tests: check for postmaster.pid anyway when "pg_ctl start" f

2022-02-10 Thread Tom Lane
Noah Misch writes: > On AIX, this pair of commits added 5-10h of runtime to 017_shm.pl. I poked into this on gcc119 (hoverfly's host). As best I can tell, the root of the problem is that "kill 9" isn't instantaneous on this platform. In [1] we find this in 017_shm_gnat.log: 2022-02-10 07:08:20

pgsql: Make pg_ctl stop/restart/promote recheck postmaster aliveness.

2022-02-10 Thread Tom Lane
Make pg_ctl stop/restart/promote recheck postmaster aliveness. "pg_ctl stop/restart" checked that the postmaster PID is valid just once, as a side-effect of sending the stop signal, and then would wait-till-timeout for the postmaster.pid file to go away. This neglects the case wherein the postmas

pgsql: Make pg_ctl stop/restart/promote recheck postmaster aliveness.

2022-02-10 Thread Tom Lane
Make pg_ctl stop/restart/promote recheck postmaster aliveness. "pg_ctl stop/restart" checked that the postmaster PID is valid just once, as a side-effect of sending the stop signal, and then would wait-till-timeout for the postmaster.pid file to go away. This neglects the case wherein the postmas

pgsql: Make pg_ctl stop/restart/promote recheck postmaster aliveness.

2022-02-10 Thread Tom Lane
Make pg_ctl stop/restart/promote recheck postmaster aliveness. "pg_ctl stop/restart" checked that the postmaster PID is valid just once, as a side-effect of sending the stop signal, and then would wait-till-timeout for the postmaster.pid file to go away. This neglects the case wherein the postmas

pgsql: Make pg_ctl stop/restart/promote recheck postmaster aliveness.

2022-02-10 Thread Tom Lane
Make pg_ctl stop/restart/promote recheck postmaster aliveness. "pg_ctl stop/restart" checked that the postmaster PID is valid just once, as a side-effect of sending the stop signal, and then would wait-till-timeout for the postmaster.pid file to go away. This neglects the case wherein the postmas

pgsql: Make pg_ctl stop/restart/promote recheck postmaster aliveness.

2022-02-10 Thread Tom Lane
Make pg_ctl stop/restart/promote recheck postmaster aliveness. "pg_ctl stop/restart" checked that the postmaster PID is valid just once, as a side-effect of sending the stop signal, and then would wait-till-timeout for the postmaster.pid file to go away. This neglects the case wherein the postmas

pgsql: Make pg_ctl stop/restart/promote recheck postmaster aliveness.

2022-02-10 Thread Tom Lane
Make pg_ctl stop/restart/promote recheck postmaster aliveness. "pg_ctl stop/restart" checked that the postmaster PID is valid just once, as a side-effect of sending the stop signal, and then would wait-till-timeout for the postmaster.pid file to go away. This neglects the case wherein the postmas

Re: pgsql: TAP tests: check for postmaster.pid anyway when "pg_ctl start" f

2022-02-10 Thread Andres Freund
Hi, On 2022-02-10 14:58:57 -0500, Tom Lane wrote: > So it looks to me like the core problem is that pg_ctl's do_stop() > is too trusting: if it once sees the postmaster PID as alive, it > figures that's the end of the story. Agreed, that's a problem. Even if it wasn't the cause of slot tests on A

Re: pgsql: TAP tests: check for postmaster.pid anyway when "pg_ctl start" f

2022-02-10 Thread Andres Freund
Hi, On 2022-02-10 14:38:06 -0800, Andres Freund wrote: > On 2022-02-10 14:58:57 -0500, Tom Lane wrote: > > So it looks to me like the core problem is that pg_ctl's do_stop() > > is too trusting: if it once sees the postmaster PID as alive, it > > figures that's the end of the story. > > Agreed, t

Re: pgsql: TAP tests: check for postmaster.pid anyway when "pg_ctl start" f

2022-02-10 Thread Tom Lane
Andres Freund writes: > Should we take the danger of postmaster dying without cleaning up the pid file > and then another process reusing that pid serious? That obviously could make > pg_ctl wait until timeout. I'm under the impression that Unixen try not to recycle PIDs within a short interval.