forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit56a95ee
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 parentfd7c0fa commit56a95ee
2 files changed
+35
-6
lines changedLines changed: 32 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10628 | 10628 |
| |
10629 | 10629 |
| |
10630 | 10630 |
| |
| 10631 | + | |
| 10632 | + | |
| 10633 | + | |
| 10634 | + | |
| 10635 | + | |
10631 | 10636 |
| |
10632 | 10637 |
| |
10633 | 10638 |
| |
10634 | 10639 |
| |
10635 | 10640 |
| |
10636 |
| - | |
| 10641 | + | |
| 10642 | + | |
10637 | 10643 |
| |
| 10644 | + | |
10638 | 10645 |
| |
10639 | 10646 |
| |
10640 | 10647 |
| |
| |||
10838 | 10845 |
| |
10839 | 10846 |
| |
10840 | 10847 |
| |
10841 |
| - | |
| 10848 | + | |
| 10849 | + | |
| 10850 | + | |
| 10851 | + | |
| 10852 | + | |
10842 | 10853 |
| |
10843 | 10854 |
| |
10844 | 10855 |
| |
| |||
10862 | 10873 |
| |
10863 | 10874 |
| |
10864 | 10875 |
| |
10865 |
| - | |
10866 | 10876 |
| |
10867 |
| - | |
| 10877 | + | |
| 10878 | + | |
| 10879 | + | |
| 10880 | + | |
| 10881 | + | |
| 10882 | + | |
| 10883 | + | |
| 10884 | + | |
| 10885 | + | |
10868 | 10886 |
| |
10869 | 10887 |
| |
| 10888 | + | |
| 10889 | + | |
10870 | 10890 |
| |
10871 | 10891 |
| |
10872 | 10892 |
| |
| |||
11104 | 11124 |
| |
11105 | 11125 |
| |
11106 | 11126 |
| |
| 11127 | + | |
| 11128 | + | |
| 11129 | + | |
| 11130 | + | |
| 11131 | + | |
| 11132 | + | |
| 11133 | + | |
11107 | 11134 |
| |
11108 | 11135 |
| |
| 11136 | + | |
11109 | 11137 |
| |
11110 | 11138 |
| |
11111 | 11139 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
215 | 215 |
| |
216 | 216 |
| |
217 | 217 |
| |
218 |
| - | |
| 218 | + | |
219 | 219 |
| |
220 | 220 |
| |
221 | 221 |
| |
| |||
324 | 324 |
| |
325 | 325 |
| |
326 | 326 |
| |
| 327 | + | |
| 328 | + | |
327 | 329 |
| |
328 | 330 |
| |
329 | 331 |
| |
330 |
| - | |
331 | 332 |
| |
332 | 333 |
| |
333 | 334 |
| |
|
0 commit comments
Comments
(0)