aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorFujii Masao <fujii@postgresql.org>2022-07-12 11:53:29 +0900
committerFujii Masao <fujii@postgresql.org>2022-07-20 09:57:01 +0900
commitb24b2be119c4cccceae838b62a3519a6d70b9476 (patch)
tree5e3b85c9e5aad2cae776d0aaad0f1969f03a93a5 /src/backend/tcop/postgres.c
parentee79647769f54076422a18845f12e106a34c5f87 (diff)
downloadpostgresql-b24b2be119c4cccceae838b62a3519a6d70b9476.tar.gz
postgresql-b24b2be119c4cccceae838b62a3519a6d70b9476.zip
Fix assertion failure and segmentation fault in backup code.
When a non-exclusive backup is canceled, do_pg_abort_backup() is called and resets some variables set by pg_backup_start (pg_start_backup in v14 or before). But previously it forgot to reset the session state indicating whether a non-exclusive backup is in progress or not in this session. This issue could cause an assertion failure when the session running BASE_BACKUP is terminated after it executed pg_backup_start and pg_backup_stop (pg_stop_backup in v14 or before). Also it could cause a segmentation fault when pg_backup_stop is called after BASE_BACKUP in the same session is canceled. This commit fixes the issue by making do_pg_abort_backup reset that session state. Back-patch to all supported branches. Author: Fujii Masao Reviewed-by: Kyotaro Horiguchi, Masahiko Sawada, Michael Paquier, Robert Haas Discussion: https://postgr.es/m/3374718f-9fbf-a950-6d66-d973e027f44c@oss.nttdata.com
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions