Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb24b2be

Browse files
committed
Fix assertion failure and segmentation fault in backup code.
When a non-exclusive backup is canceled, do_pg_abort_backup() is calledand resets some variables set by pg_backup_start (pg_start_backup in v14or before). But previously it forgot to reset the session state indicatingwhether a non-exclusive backup is in progress or not in this session.This issue could cause an assertion failure when the session runningBASE_BACKUP is terminated after it executed pg_backup_start andpg_backup_stop (pg_stop_backup in v14 or before). Also it could causea segmentation fault when pg_backup_stop is called after BASE_BACKUPin the same session is canceled.This commit fixes the issue by making do_pg_abort_backup resetthat session state.Back-patch to all supported branches.Author: Fujii MasaoReviewed-by: Kyotaro Horiguchi, Masahiko Sawada, Michael Paquier, Robert HaasDiscussion:https://postgr.es/m/3374718f-9fbf-a950-6d66-d973e027f44c@oss.nttdata.com
1 parentee79647 commitb24b2be

File tree

1 file changed

+2
-0
lines changed
  • src/backend/access/transam

1 file changed

+2
-0
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8791,6 +8791,8 @@ do_pg_abort_backup(int code, Datum arg)
87918791
{
87928792
XLogCtl->Insert.forcePageWrites= false;
87938793
}
8794+
8795+
sessionBackupState=SESSION_BACKUP_NONE;
87948796
WALInsertLockRelease();
87958797

87968798
if (emit_warning)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp