diff options
author | Fujii Masao <fujii@postgresql.org> | 2017-12-19 03:46:14 +0900 |
---|---|---|
committer | Fujii Masao <fujii@postgresql.org> | 2017-12-19 03:46:14 +0900 |
commit | 56a95ee5118bf6d46e261b8d352f7dafac10587d (patch) | |
tree | bfbc01dc6254c67547a6b202687c12caf32cb50c /src/interfaces/libpq/fe-auth.c | |
parent | fd7c0fa732d97a4b4ebb58730e6244ea30d0a618 (diff) | |
download | postgresql-56a95ee5118bf6d46e261b8d352f7dafac10587d.tar.gz postgresql-56a95ee5118bf6d46e261b8d352f7dafac10587d.zip |
Fix bug in cancellation of non-exclusive backup to avoid assertion failure.
Previously an assertion failure occurred when pg_stop_backup() for
non-exclusive backup was aborted while it's waiting for WAL files to
be 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-exclusive
backup running when it's called. But pg_stop_backup() can be canceled
even after it marks the end of non-exclusive backup (e.g.,
during waiting for WAL archiving). This broke the assumption that
do_pg_abort_backup() relies on, and which caused an assertion failure.
This commit changes do_pg_abort_backup() so that it does nothing
when 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 is
no running backup.
Backpatch to 9.6 where SQL-callable non-exclusive backup was added.
Author: Masahiko Sawada and Michael Paquier
Reviewed-By: Robert Haas and Fujii Masao
Discussion: https://www.postgresql.org/message-id/CAD21AoD2L1Fu2c==gnVASMyFAAaq3y-AQ2uEVj-zTCGFFjvmDg@mail.gmail.com
Diffstat (limited to 'src/interfaces/libpq/fe-auth.c')
0 files changed, 0 insertions, 0 deletions