Commit 56a7147
committed
Block replication slot advance for these not yet reserving WAL
Such replication slots are physical slots freshly created without WAL
being reserved, which is the default behavior, which have not been used
yet as WAL consumption resources to retain WAL. This prevents advancing
a slot to a position older than any WAL available, which could falsify
calculations for WAL segment recycling.
This also cleans up a bit the code, as ReplicationSlotRelease() would be
called on ERROR, and improves error messages.
Reported-by: Kyotaro Horiguchi
Author: Michael Paquier
Reviewed-by: Andres Freund, Álvaro Herrera, Kyotaro Horiguchi
Discussion: https://postgr.es/m/20180626071305.GH31353@paquier.xyz1 parent b6e3a3a commit 56a7147
File tree
4 files changed
+33
-6
lines changed- contrib/test_decoding
- expected
- sql
- doc/src/sgml
- src/backend/replication
4 files changed
+33
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9867 | 9867 | | |
9868 | 9868 | | |
9869 | 9869 | | |
9870 | | - | |
| 9870 | + | |
| 9871 | + | |
9871 | 9872 | | |
9872 | 9873 | | |
9873 | 9874 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
486 | 492 | | |
487 | 493 | | |
488 | 494 | | |
| |||
495 | 501 | | |
496 | 502 | | |
497 | 503 | | |
498 | | - | |
499 | | - | |
500 | 504 | | |
501 | | - | |
502 | | - | |
| 505 | + | |
| 506 | + | |
503 | 507 | | |
504 | 508 | | |
505 | | - | |
506 | 509 | | |
507 | 510 | | |
508 | 511 | | |
| |||
0 commit comments