postgresql/src/bin
Tom Lane 282b6d00ab pg_receivewal, pg_recvlogical: allow canceling initial password prompt.
Previously it was impossible to terminate these programs via control-C
while they were prompting for a password.  We can fix that trivially
for their initial password prompts, by moving setup of the SIGINT
handler from just before to just after their initial GetConnection()
calls.

This fix doesn't permit escaping out of later re-prompts, but those
should be exceedingly rare, since the user's password or the server's
authentication setup would have to have changed meanwhile.  We
considered applying a fix similar to commit 46d665bc2, but that
seemed more complicated than it'd be worth.  Moreover, this way is
back-patchable, which that wasn't.

The misbehavior exists in all supported versions, so back-patch to all.

Tom Lane and Nathan Bossart

Discussion: https://postgr.es/m/747443.1635536754@sss.pgh.pa.us
2021-11-21 14:13:35 -05:00
..
initdb Provide a variant of simple_prompt() that can be interrupted by ^C. 2021-11-17 19:09:54 -05:00
pg_amcheck Remove tests added by bd807be693. 2021-11-07 15:32:32 -05:00
pg_archivecleanup Move Perl test modules to a better namespace 2021-10-24 10:28:19 -04:00
pg_basebackup pg_receivewal, pg_recvlogical: allow canceling initial password prompt. 2021-11-21 14:13:35 -05:00
pg_checksums Move Perl test modules to a better namespace 2021-10-24 10:28:19 -04:00
pg_config Move Perl test modules to a better namespace 2021-10-24 10:28:19 -04:00
pg_controldata Move Perl test modules to a better namespace 2021-10-24 10:28:19 -04:00
pg_ctl Move Perl test modules to a better namespace 2021-10-24 10:28:19 -04:00
pg_dump Handle close() failures more robustly in pg_dump and pg_basebackup. 2021-11-17 13:08:25 -05:00
pg_resetwal Move Perl test modules to a better namespace 2021-10-24 10:28:19 -04:00
pg_rewind Move Perl test modules to a better namespace 2021-10-24 10:28:19 -04:00
pg_test_fsync Move Perl test modules to a better namespace 2021-10-24 10:28:19 -04:00
pg_test_timing Move Perl test modules to a better namespace 2021-10-24 10:28:19 -04:00
pg_upgrade Fix tests of pg_upgrade across different major versions 2021-10-13 09:22:00 +09:00
pg_verifybackup Move Perl test modules to a better namespace 2021-10-24 10:28:19 -04:00
pg_waldump Move Perl test modules to a better namespace 2021-10-24 10:28:19 -04:00
pgbench pgbench: Fix typo in comment. 2021-11-02 23:08:02 +09:00
pgevent Update copyright for 2021 2021-01-02 13:06:25 -05:00
psql Allow psql's other uses of simple_prompt() to be interrupted by ^C. 2021-11-19 12:11:46 -05:00
scripts Clarify that --system reindexes system catalogs *only* 2021-10-27 16:28:11 +02:00
Makefile Add pg_amcheck, a CLI for contrib/amcheck. 2021-03-12 13:00:01 -05:00