postgresql/src
Fujii Masao 2497d2b770 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
2022-07-20 09:54:24 +09:00
..
backend Fix assertion failure and segmentation fault in backup code. 2022-07-20 09:54:24 +09:00
bin Fix \watch's interaction with libedit on ^C. 2022-07-10 16:57:04 +12:00
common Inhibit mingw CRT's auto-globbing of command line arguments 2022-04-25 15:51:58 -04:00
fe_utils Clean up assorted failures under clang's -fsanitize=undefined checks. 2022-03-03 18:13:24 -05:00
include Fix the logical replication timeout during large transactions. 2022-05-11 10:01:35 +05:30
interfaces Fix previous commit's ecpg_clocale for ppc Darwin. 2022-07-02 21:03:24 -07:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:36 -04:00
pl Fix pl/perl test case so it will still work under Perl 5.36. 2022-06-01 16:15:47 -04:00
port Stamp 10.21. 2022-05-09 17:21:58 -04:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:46 -05:00
test Fix alias matching in transformLockingClause(). 2022-07-07 13:07:51 +01:00
timezone Update time zone data files to tzdata release 2022a. 2022-05-05 14:55:30 -04:00
tools Improve setup of environment values for commands in MSVC's vcregress.pl 2022-05-11 10:22:44 +09:00
tutorial tutorial: land height is "elevation", not "altitude" 2021-03-10 20:25:18 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS
Makefile Build src/test/isolation during "make" and "make install". 2017-11-22 20:18:52 -08:00
Makefile.global.in Fix prove_installcheck to use correct paths when used with PGXS 2021-07-01 08:48:24 -04:00
Makefile.shlib makefile: use proper linker flags for C++ compiles 2020-03-31 22:26:11 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00