forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit0668c84
committed
Fix bug in cancellation of non-exclusive backup to avoid assertion failure.
Previously an assertion failure occurred when pg_stop_backup() fornon-exclusive backup was aborted while it's waiting for WAL files tobe archived. This assertion failure happened in do_pg_abort_backup()which was called when a non-exclusive backup was canceled.do_pg_abort_backup() assumes that there is at least one non-exclusivebackup running when it's called. But pg_stop_backup() can be canceledeven after it marks the end of non-exclusive backup (e.g.,during waiting for WAL archiving). This broke the assumption thatdo_pg_abort_backup() relies on, and which caused an assertion failure.This commit changes do_pg_abort_backup() so that it does nothingwhen non-exclusive backup has been already marked as completed.That is, the asssumption is also changed, and do_pg_abort_backup()now can handle even the case where it's called when there isno running backup.Backpatch to 9.6 where SQL-callable non-exclusive backup was added.Author: Masahiko Sawada and Michael PaquierReviewed-By: Robert Haas and Fujii MasaoDiscussion:https://www.postgresql.org/message-id/CAD21AoD2L1Fu2c==gnVASMyFAAaq3y-AQ2uEVj-zTCGFFjvmDg@mail.gmail.com1 parent986a915 commit0668c84
2 files changed
+35
-6
lines changedLines changed: 32 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10275 | 10275 |
| |
10276 | 10276 |
| |
10277 | 10277 |
| |
| 10278 | + | |
| 10279 | + | |
| 10280 | + | |
| 10281 | + | |
| 10282 | + | |
10278 | 10283 |
| |
10279 | 10284 |
| |
10280 | 10285 |
| |
10281 | 10286 |
| |
10282 | 10287 |
| |
10283 |
| - | |
| 10288 | + | |
| 10289 | + | |
10284 | 10290 |
| |
| 10291 | + | |
10285 | 10292 |
| |
10286 | 10293 |
| |
10287 | 10294 |
| |
| |||
10489 | 10496 |
| |
10490 | 10497 |
| |
10491 | 10498 |
| |
10492 |
| - | |
| 10499 | + | |
| 10500 | + | |
| 10501 | + | |
| 10502 | + | |
| 10503 | + | |
10493 | 10504 |
| |
10494 | 10505 |
| |
10495 | 10506 |
| |
| |||
10513 | 10524 |
| |
10514 | 10525 |
| |
10515 | 10526 |
| |
10516 |
| - | |
10517 | 10527 |
| |
10518 |
| - | |
| 10528 | + | |
| 10529 | + | |
| 10530 | + | |
| 10531 | + | |
| 10532 | + | |
| 10533 | + | |
| 10534 | + | |
| 10535 | + | |
| 10536 | + | |
10519 | 10537 |
| |
10520 | 10538 |
| |
| 10539 | + | |
| 10540 | + | |
10521 | 10541 |
| |
10522 | 10542 |
| |
10523 | 10543 |
| |
| |||
10750 | 10770 |
| |
10751 | 10771 |
| |
10752 | 10772 |
| |
| 10773 | + | |
| 10774 | + | |
| 10775 | + | |
| 10776 | + | |
| 10777 | + | |
| 10778 | + | |
| 10779 | + | |
10753 | 10780 |
| |
10754 | 10781 |
| |
| 10782 | + | |
10755 | 10783 |
| |
10756 | 10784 |
| |
10757 | 10785 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
140 | 140 |
| |
141 | 141 |
| |
142 | 142 |
| |
143 |
| - | |
| 143 | + | |
144 | 144 |
| |
145 | 145 |
| |
146 | 146 |
| |
| |||
249 | 249 |
| |
250 | 250 |
| |
251 | 251 |
| |
| 252 | + | |
| 253 | + | |
252 | 254 |
| |
253 | 255 |
| |
254 | 256 |
| |
255 |
| - | |
256 | 257 |
| |
257 | 258 |
| |
258 | 259 |
| |
|
0 commit comments
Comments
(0)