forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb2c95a3
committed
Fix replication origin-related race conditions
Similar to what was fixed in commit9915de6 for replication slots,but this time it's related to replication origins: DROP SUBSCRIPTIONattempts to drop the replication origin, but that fails if thereplication worker process hasn't yet marked it unused. This causesfailures in the buildfarm:ERROR: could not drop replication origin with OID 1, in use by PID 34069Like the aforementioned commit, fix by having the process running DROPSUBSCRIPTION sleep until the worker marks the the replication originstruct as free. This uses a condition variable on each replicationorigin shmem state struct, so that the session trying to drop can sleepand expect to be awakened by the process keeping the origin open.Also fix a SGML markup in the previous commit.Discussion:https://postgr.es/m/20170808001433.rozlseaf4m2wkw3n@alvherre.pgsql1 parent030273b commitb2c95a3
File tree
6 files changed
+58
-15
lines changed- doc/src/sgml
- src
- backend
- commands
- postmaster
- replication/logical
- include
- replication
6 files changed
+58
-15
lines changedLines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1222 | 1222 |
| |
1223 | 1223 |
| |
1224 | 1224 |
| |
1225 |
| - | |
| 1225 | + | |
1226 | 1226 |
| |
1227 | 1227 |
| |
1228 | 1228 |
| |
1229 |
| - | |
| 1229 | + | |
1230 | 1230 |
| |
1231 | 1231 |
| |
1232 | 1232 |
| |
| |||
1302 | 1302 |
| |
1303 | 1303 |
| |
1304 | 1304 |
| |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
1305 | 1309 |
| |
1306 | 1310 |
| |
1307 | 1311 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
939 | 939 |
| |
940 | 940 |
| |
941 | 941 |
| |
942 |
| - | |
| 942 | + | |
943 | 943 |
| |
944 | 944 |
| |
945 | 945 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3609 | 3609 |
| |
3610 | 3610 |
| |
3611 | 3611 |
| |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
3612 | 3615 |
| |
3613 | 3616 |
| |
3614 | 3617 |
| |
|
Lines changed: 46 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
79 | 79 |
| |
80 | 80 |
| |
81 | 81 |
| |
82 |
| - | |
83 | 82 |
| |
84 | 83 |
| |
85 | 84 |
| |
86 | 85 |
| |
87 |
| - | |
| 86 | + | |
88 | 87 |
| |
89 | 88 |
| |
90 | 89 |
| |
| 90 | + | |
91 | 91 |
| |
92 | 92 |
| |
93 | 93 |
| |
| |||
124 | 124 |
| |
125 | 125 |
| |
126 | 126 |
| |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
127 | 132 |
| |
128 | 133 |
| |
129 | 134 |
| |
| |||
324 | 329 |
| |
325 | 330 |
| |
326 | 331 |
| |
327 |
| - | |
| 332 | + | |
328 | 333 |
| |
329 |
| - | |
| 334 | + | |
330 | 335 |
| |
331 | 336 |
| |
332 | 337 |
| |
333 | 338 |
| |
334 | 339 |
| |
335 | 340 |
| |
336 | 341 |
| |
| 342 | + | |
| 343 | + | |
337 | 344 |
| |
338 | 345 |
| |
339 | 346 |
| |
| |||
346 | 353 |
| |
347 | 354 |
| |
348 | 355 |
| |
349 |
| - | |
350 |
| - | |
351 |
| - | |
352 |
| - | |
353 |
| - | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
354 | 371 |
| |
355 | 372 |
| |
356 | 373 |
| |
| |||
382 | 399 |
| |
383 | 400 |
| |
384 | 401 |
| |
385 |
| - | |
| 402 | + | |
386 | 403 |
| |
387 | 404 |
| |
388 | 405 |
| |
| |||
476 | 493 |
| |
477 | 494 |
| |
478 | 495 |
| |
| 496 | + | |
479 | 497 |
| |
480 | 498 |
| |
| 499 | + | |
| 500 | + | |
481 | 501 |
| |
482 | 502 |
| |
483 | 503 |
| |
| |||
957 | 977 |
| |
958 | 978 |
| |
959 | 979 |
| |
| 980 | + | |
| 981 | + | |
960 | 982 |
| |
961 | 983 |
| |
962 | 984 |
| |
963 | 985 |
| |
964 | 986 |
| |
| 987 | + | |
| 988 | + | |
965 | 989 |
| |
966 | 990 |
| |
967 | 991 |
| |
968 | 992 |
| |
969 | 993 |
| |
| 994 | + | |
| 995 | + | |
| 996 | + | |
970 | 997 |
| |
971 | 998 |
| |
972 | 999 |
| |
| |||
1056 | 1083 |
| |
1057 | 1084 |
| |
1058 | 1085 |
| |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
1059 | 1089 |
| |
1060 | 1090 |
| |
1061 | 1091 |
| |
| |||
1067 | 1097 |
| |
1068 | 1098 |
| |
1069 | 1099 |
| |
| 1100 | + | |
| 1101 | + | |
1070 | 1102 |
| |
1071 | 1103 |
| |
1072 | 1104 |
| |
| |||
1077 | 1109 |
| |
1078 | 1110 |
| |
1079 | 1111 |
| |
| 1112 | + | |
1080 | 1113 |
| |
1081 | 1114 |
| |
1082 | 1115 |
| |
| 1116 | + | |
| 1117 | + | |
1083 | 1118 |
| |
1084 | 1119 |
| |
1085 | 1120 |
| |
| |||
1170 | 1205 |
| |
1171 | 1206 |
| |
1172 | 1207 |
| |
1173 |
| - | |
| 1208 | + | |
1174 | 1209 |
| |
1175 | 1210 |
| |
1176 | 1211 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
812 | 812 |
| |
813 | 813 |
| |
814 | 814 |
| |
| 815 | + | |
815 | 816 |
| |
816 | 817 |
| |
817 | 818 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
44 |
| - | |
| 44 | + | |
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
|
0 commit comments
Comments
(0)