postgresql/src/backend
Fujii Masao e7564ee8cd Clear base backup progress on backup failure
Previously, if a base backup failed after it had started streaming
files, pg_stat_progress_basebackup could continue to show a stale
progress entry even though the backup was no longer running. This could
be observed when the client kept the replication connection open after
the error. It is normally not observable when using pg_basebackup,
because the client disconnects after the error.

The problem was that progress reporting was cleared only after
successful completion.

This commit moves the progress reporting cleanup into the progress
sink's cleanup callback so that it is cleared after both successful
and failed backups.

Backpatch to v15. v14 has the same issue, but the fix does not apply
cleanly because it lacks the base backup sink infrastructure. Since
the bug does not affect the backup itself and is normally not
observable when using pg_basebackup, skip the v14 backpatch.

Author: Chao Li <lic@highgo.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/EA1A6CD2-EFA6-462B-9A02-03003555AB4A@gmail.com
Backpatch-through: 15
2026-07-01 23:05:12 +09:00
..
access Fix unlogged sequence corruption after standby promotion 2026-06-30 08:50:50 +09:00
archive Update copyright for 2025 2025-01-01 11:21:55 -05:00
backup Clear base backup progress on backup failure 2026-07-01 23:05:12 +09:00
bootstrap Remove unnecessary (char *) casts [mem] 2025-02-12 08:50:13 +01:00
catalog Remove inappropriate translation marker in getObjectIdentityParts(). 2026-06-08 15:24:02 -04:00
commands Fix unlogged sequence corruption after standby promotion 2026-06-30 08:50:50 +09:00
executor Avoid ABI break in ModifyTableState from the FDW pruning fix 2026-06-25 12:15:02 +09:00
foreign Track the number of presorted outer pathkeys in MergePath 2025-05-08 18:21:32 +09:00
jit Update JIT tuple deforming code for virtual generated columns 2026-06-19 15:26:51 +12:00
lib Correct list of files in src/backend/lib/README 2025-06-27 09:31:23 +09:00
libpq Fix compilation with OpenSSL 4 2026-06-12 13:57:22 +02:00
main Avoid possible crash within libsanitizer. 2025-11-05 11:09:30 -05:00
nodes IS JSON/JSON(): Protect against expressions uncoercible to text 2026-06-11 16:17:58 +02:00
optimizer Strip removed-relation references from PlaceHolderVars at join removal 2026-06-22 10:43:01 +09:00
parser IS JSON/JSON(): Protect against expressions uncoercible to text 2026-06-11 16:17:58 +02:00
partitioning Strip PlaceHolderVars from partition pruning operands 2026-04-09 16:43:28 +09:00
po Translation updates 2026-05-11 13:03:08 +02:00
port Don't treat EINVAL from semget() as a hard failure. 2025-08-13 11:59:47 -04:00
postmaster Fix orphaned processes when startup process fails during PM_STARTUP 2026-04-21 09:40:03 +09:00
regex Harden our regex engine against integer overflow in size calculations. 2026-05-11 05:13:47 -07:00
replication Avoid stale slot access after dropping obsolete synced slots. 2026-06-18 09:42:56 +05:30
rewrite Fix UPDATE/DELETE ... WHERE CURRENT OF on a table with virtual columns. 2026-04-22 11:50:18 +01:00
snowball Use PG_MODULE_MAGIC_EXT in our installable shared libraries. 2025-03-26 11:11:02 -04:00
statistics Fix size check in statext_dependencies_deserialize() 2026-05-25 14:38:59 +09:00
storage Fix race between ProcSignalInit() and EmitProcSignalBarrier(). 2026-05-27 16:25:59 -07:00
tcop Fix unbounded recursive handling of SSL/GSS in ProcessStartupPacket() 2026-05-11 05:13:47 -07:00
tsearch dict_synonym.c: remove incorrect outlen. 2026-06-08 11:47:40 -07:00
utils Document wal_compression=on 2026-07-01 09:02:36 +07:00
.gitignore Add .gitignore entries for AIX-specific intermediate build artifacts. 2015-07-08 20:44:22 -04:00
common.mk Blind attempt to fix LLVM dependency in the backend 2022-09-15 10:53:48 +07:00
Makefile Fix build inconsistency due to the generation of wait-event code 2026-02-02 08:02:59 +09:00
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls.mk Return yyparse() result not via global variable 2025-01-24 06:55:39 +01:00