forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit43d4dd8
committed
psql: Make cancel test more timing robust
The previous coding relied on the PID file appearing and the querystarting "fast enough", which can fail on slow machines. Also, theremight have been an undocumented interference between alarm andIPC::Run. This new coding doesn't rely on any of these concurrencymechanisms. Instead, we wait unitl the PID file is complete beforeproceeding, and then also wait until the sleep query is registered bythe server.Discussion:https://www.postgresql.org/message-id/flat/E1mH14Q-0002gh-HS%40gemulon.postgresql.org1 parentbb9ff46 commit43d4dd8
1 file changed
+27
-8
lines changedLines changed: 27 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| 10 | + | |
10 | 11 |
| |
11 | 12 |
| |
12 | 13 |
| |
| |||
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
31 |
| - | |
| 32 | + | |
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
35 | 36 |
| |
36 |
| - | |
37 |
| - | |
38 |
| - | |
39 |
| - | |
40 |
| - | |
| 37 | + | |
| 38 | + | |
41 | 39 |
| |
42 |
| - | |
43 |
| - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
44 | 63 |
| |
45 | 64 |
| |
46 | 65 |
| |
|
0 commit comments
Comments
(0)