forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit282b6d0
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 parent92e7079 commit282b6d0
2 files changed
+20
-15
lines changedLines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
917 | 917 |
| |
918 | 918 |
| |
919 | 919 |
| |
920 |
| - | |
921 |
| - | |
922 |
| - | |
923 |
| - | |
924 | 920 |
| |
925 | 921 |
| |
926 | 922 |
| |
| |||
930 | 926 |
| |
931 | 927 |
| |
932 | 928 |
| |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
933 | 937 |
| |
934 | 938 |
| |
935 | 939 |
| |
|
Lines changed: 12 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
216 | 216 |
| |
217 | 217 |
| |
218 | 218 |
| |
219 |
| - | |
220 |
| - | |
221 | 219 |
| |
222 | 220 |
| |
223 | 221 |
| |
| |||
236 | 234 |
| |
237 | 235 |
| |
238 | 236 |
| |
| 237 | + | |
239 | 238 |
| |
240 | 239 |
| |
241 | 240 |
| |
| |||
932 | 931 |
| |
933 | 932 |
| |
934 | 933 |
| |
935 |
| - | |
936 |
| - | |
937 |
| - | |
938 |
| - | |
939 |
| - | |
940 |
| - | |
941 | 934 |
| |
942 |
| - | |
943 |
| - | |
944 |
| - | |
| 935 | + | |
| 936 | + | |
945 | 937 |
| |
946 | 938 |
| |
947 | 939 |
| |
948 | 940 |
| |
949 | 941 |
| |
950 | 942 |
| |
951 | 943 |
| |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
952 | 953 |
| |
953 | 954 |
| |
954 | 955 |
| |
|
0 commit comments
Comments
(0)