Fix backup canceling

Teodor Sigaev <teodor@sigaev.ru>

Commit: 8de6278d3b7c810fe5d31486491189d88550a2a6
Author: Teodor Sigaev <teodor@sigaev.ru>
Date: 2017-03-24T10:55:02Z
Releases: 9.6.3
Fix backup canceling

Assert-enabled build crashes but without asserts it works by wrong way:
it may not reset forcing full page write and preventing from starting
exclusive backup with the same name as cancelled.
Patch replaces pair of booleans
nonexclusive_backup_running/exclusive_backup_running to single enum to
correctly describe backup state.

Backpatch to 9.6 where bug was introduced

Reported-by: David Steele
Authors: Michael Paquier, David Steele
Reviewed-by: Anastasia Lubennikova

https://commitfest.postgresql.org/13/1068/

Files

PathChange+/−
src/backend/access/transam/xlog.c modified +22 −0
src/backend/access/transam/xlogfuncs.c modified +10 −15
src/include/access/xlog.h modified +20 −1