forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit133d2fa
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 parentb70ea4c commit133d2fa
2 files changed
+35
-6
lines changedLines changed: 32 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10609 | 10609 |
| |
10610 | 10610 |
| |
10611 | 10611 |
| |
| 10612 | + | |
| 10613 | + | |
| 10614 | + | |
| 10615 | + | |
| 10616 | + | |
10612 | 10617 |
| |
10613 | 10618 |
| |
10614 | 10619 |
| |
10615 | 10620 |
| |
10616 | 10621 |
| |
10617 |
| - | |
| 10622 | + | |
| 10623 | + | |
10618 | 10624 |
| |
| 10625 | + | |
10619 | 10626 |
| |
10620 | 10627 |
| |
10621 | 10628 |
| |
| |||
10819 | 10826 |
| |
10820 | 10827 |
| |
10821 | 10828 |
| |
10822 |
| - | |
| 10829 | + | |
| 10830 | + | |
| 10831 | + | |
| 10832 | + | |
| 10833 | + | |
10823 | 10834 |
| |
10824 | 10835 |
| |
10825 | 10836 |
| |
| |||
10843 | 10854 |
| |
10844 | 10855 |
| |
10845 | 10856 |
| |
10846 |
| - | |
10847 | 10857 |
| |
10848 |
| - | |
| 10858 | + | |
| 10859 | + | |
| 10860 | + | |
| 10861 | + | |
| 10862 | + | |
| 10863 | + | |
| 10864 | + | |
| 10865 | + | |
| 10866 | + | |
10849 | 10867 |
| |
10850 | 10868 |
| |
| 10869 | + | |
| 10870 | + | |
10851 | 10871 |
| |
10852 | 10872 |
| |
10853 | 10873 |
| |
| |||
11085 | 11105 |
| |
11086 | 11106 |
| |
11087 | 11107 |
| |
| 11108 | + | |
| 11109 | + | |
| 11110 | + | |
| 11111 | + | |
| 11112 | + | |
| 11113 | + | |
| 11114 | + | |
11088 | 11115 |
| |
11089 | 11116 |
| |
| 11117 | + | |
11090 | 11118 |
| |
11091 | 11119 |
| |
11092 | 11120 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
211 | 211 |
| |
212 | 212 |
| |
213 | 213 |
| |
214 |
| - | |
| 214 | + | |
215 | 215 |
| |
216 | 216 |
| |
217 | 217 |
| |
| |||
320 | 320 |
| |
321 | 321 |
| |
322 | 322 |
| |
| 323 | + | |
| 324 | + | |
323 | 325 |
| |
324 | 326 |
| |
325 | 327 |
| |
326 |
| - | |
327 | 328 |
| |
328 | 329 |
| |
329 | 330 |
| |
|
0 commit comments
Comments
(0)