Commit f6c5edb
Amit Kapila
Drop replication origin slots before tablesync worker exits.
Currently, the replication origin tracking of the tablesync worker is
dropped by the apply worker. So, there will be a small lag between the
tablesync worker exit and its origin tracking got removed. In the
meantime, new tablesync workers can be launched and will try to set up
a new origin tracking. This can lead the system to reach max configured
limit (max_replication_slots) even if the user has configured the max
limit considering the number of tablesync workers required in the system.
We decided not to back-patch as this can occur in very narrow
circumstances and users have to option to increase the configured limit by
increasing max_replication_slots.
Reported-by: Hubert Depesz Lubaczewski
Author: Ajin Cherian
Reviwed-by: Masahiko Sawada, Peter Smith, Hou Zhijie, Amit Kapila
Discussion: https://postgr.es/m/20220714115155.GA5439@depesz.com1 parent 8654246 commit f6c5edb
File tree
2 files changed
+41
-34
lines changed- src/backend
- commands
- replication/logical
2 files changed
+41
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
919 | 919 | | |
920 | 920 | | |
921 | 921 | | |
922 | | - | |
923 | | - | |
| 922 | + | |
| 923 | + | |
924 | 924 | | |
925 | | - | |
| 925 | + | |
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
930 | 930 | | |
931 | 931 | | |
932 | 932 | | |
933 | | - | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
| 933 | + | |
| 934 | + | |
938 | 935 | | |
939 | 936 | | |
940 | 937 | | |
| |||
1507 | 1504 | | |
1508 | 1505 | | |
1509 | 1506 | | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
1510 | 1510 | | |
1511 | 1511 | | |
1512 | 1512 | | |
1513 | 1513 | | |
1514 | | - | |
1515 | | - | |
1516 | | - | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
1517 | 1520 | | |
1518 | 1521 | | |
1519 | 1522 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
| 294 | + | |
294 | 295 | | |
295 | 296 | | |
296 | 297 | | |
| |||
309 | 310 | | |
310 | 311 | | |
311 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
312 | 337 | | |
313 | 338 | | |
314 | 339 | | |
| |||
318 | 343 | | |
319 | 344 | | |
320 | 345 | | |
321 | | - | |
| 346 | + | |
322 | 347 | | |
323 | 348 | | |
324 | 349 | | |
| |||
441 | 466 | | |
442 | 467 | | |
443 | 468 | | |
444 | | - | |
445 | | - | |
446 | 469 | | |
447 | 470 | | |
448 | 471 | | |
| |||
452 | 475 | | |
453 | 476 | | |
454 | 477 | | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
| 478 | + | |
475 | 479 | | |
476 | 480 | | |
477 | 481 | | |
| |||
0 commit comments