forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit33edf4a
committed
pg_receivewal, pg_recvlogical: allow canceling initial password prompt.
Previously it was impossible to terminate these programs via control-Cwhile they were prompting for a password. We can fix that triviallyfor their initial password prompts, by moving setup of the SIGINThandler from just before to just after their initial GetConnection()calls.This fix doesn't permit escaping out of later re-prompts, but thoseshould be exceedingly rare, since the user's password or the server'sauthentication setup would have to have changed meanwhile. Weconsidered applying a fix similar to commit46d665b, but thatseemed more complicated than it'd be worth. Moreover, this way isback-patchable, which that wasn't.The misbehavior exists in all supported versions, so back-patch to all.Tom Lane and Nathan BossartDiscussion:https://postgr.es/m/747443.1635536754@sss.pgh.pa.us1 parent33b6dd8 commit33edf4a
2 files changed
+20
-14
lines changedLines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
675 | 675 |
| |
676 | 676 |
| |
677 | 677 |
| |
678 |
| - | |
679 |
| - | |
680 |
| - | |
681 |
| - | |
682 | 678 |
| |
683 | 679 |
| |
684 | 680 |
| |
| |||
688 | 684 |
| |
689 | 685 |
| |
690 | 686 |
| |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
691 | 695 |
| |
692 | 696 |
| |
693 | 697 |
| |
|
Lines changed: 12 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
212 | 212 |
| |
213 | 213 |
| |
214 | 214 |
| |
215 |
| - | |
216 |
| - | |
217 | 215 |
| |
218 | 216 |
| |
219 | 217 |
| |
| |||
232 | 230 |
| |
233 | 231 |
| |
234 | 232 |
| |
| 233 | + | |
235 | 234 |
| |
236 | 235 |
| |
237 | 236 |
| |
| |||
920 | 919 |
| |
921 | 920 |
| |
922 | 921 |
| |
923 |
| - | |
924 |
| - | |
925 |
| - | |
926 |
| - | |
927 |
| - | |
928 | 922 |
| |
929 |
| - | |
930 |
| - | |
931 |
| - | |
| 923 | + | |
| 924 | + | |
932 | 925 |
| |
933 | 926 |
| |
934 | 927 |
| |
935 | 928 |
| |
936 | 929 |
| |
937 | 930 |
| |
938 | 931 |
| |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
939 | 941 |
| |
940 | 942 |
| |
941 | 943 |
| |
|
0 commit comments
Comments
(0)