postgresql/src/backend
Fujii Masao 422e54e309 Fix stale COPY progress during logical replication table sync
Previously, pg_stat_progress_copy in the subscriber could continue to show
the initial COPY operation for logical replication table synchronization as
active even after the data copy had finished. The stale progress entry
remained visible until synchronization caught up with the publisher.

This happened because the table synchronization code called BeginCopyFrom()
and CopyFrom(), but failed to call EndCopyFrom() afterward.

This commit fixes the issue by adding the missing EndCopyFrom() call so that
the COPY progress state in the subscriber is cleared as soon as the initial
data copy completes.

Backpatch to all supported branches.

Author: Shinya Kato <shinya11.kato@gmail.com>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Reviewed-by: ChangAo Chen <cca5507@qq.com>
Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Discussion: https://postgr.es/m/CAOzEurQKuy3RiPkd=25PEwEzaqHuGvEOf=X7vaVzhgNjaukYzA@mail.gmail.com
Backpatch-through: 14
2026-05-13 11:44:31 +09:00
..
access Fix WAIT FOR LSN cleanup on subtransaction abort 2026-05-06 13:56:38 +03:00
archive Don't include wait_event.h in pgstat.h 2026-03-06 16:24:58 +01:00
backup Online enabling and disabling of data checksums 2026-04-03 22:58:51 +02:00
bootstrap Rework signal handler infrastructure to pass sender info as argument. 2026-04-15 07:30:34 -04:00
catalog Use schema-qualified names in EXCEPT clause error messages. 2026-05-08 10:00:26 +05:30
commands Fix REPACK with WITHOUT OVERLAPS replica identity indexes 2026-05-11 18:17:46 +02:00
executor Use "concurrent delete" in serialization error for TM_Deleted cases 2026-05-01 10:00:29 +09:00
foreign Remove bits* typedefs. 2026-03-30 16:12:08 -05:00
jit jit: No backport::SectionMemoryManager for LLVM 22. 2026-04-03 14:55:11 +13:00
lib Fix a set of typos and grammar issues across the tree 2026-04-21 14:46:22 +09:00
libpq Apply timingsafe_bcmp() in authentication paths 2026-05-11 05:13:46 -07:00
main Update copyright for 2026 2026-01-01 13:24:10 -05:00
nodes Handle nodes that may appear in GraphPattern expression trees 2026-05-04 17:34:32 +02:00
optimizer Consider opfamily and collation when removing redundant GROUP BY columns 2026-05-08 12:45:51 +09:00
parser Enforce RETURNING typmod for empty-set JSON_ARRAY(query) 2026-05-08 17:21:48 +09:00
partitioning Message corrections for partition split/merge commands 2026-05-07 19:10:35 +07:00
po Update copyright for 2026 2026-01-01 13:24:10 -05:00
port Rework signal handler infrastructure to pass sender info as argument. 2026-04-15 07:30:34 -04:00
postmaster Fix race condition in XLogLogicalInfo and ProcSignal initialization. 2026-05-07 10:09:42 -07:00
regex Harden our regex engine against integer overflow in size calculations. 2026-05-11 05:13:46 -07:00
replication Fix stale COPY progress during logical replication table sync 2026-05-13 11:44:31 +09:00
rewrite Make spelling consistent 2026-05-05 09:36:54 +02:00
snowball Fix meson build of snowball code. 2026-01-05 16:51:36 -05:00
statistics Fix MCV input array checks in statistics restore functions 2026-05-11 05:13:46 -07:00
storage Make palloc_array() and friends safe against integer overflow. 2026-05-11 05:13:46 -07:00
tcop Fix unbounded recursive handling of SSL/GSS in ProcessStartupPacket() 2026-05-11 05:13:46 -07:00
tsearch Fix overflows with ts_headline() 2026-05-11 05:13:46 -07:00
utils De-obfuscate the comment in tsrank.c's calc_rank_or(). 2026-05-12 15:21:36 -04:00
.gitignore
common.mk
Makefile ssl: Serverside SNI support for libpq 2026-03-18 12:37:11 +01:00
meson.build Add CONCURRENTLY option to REPACK 2026-04-06 21:55:08 +02:00
nls.mk Create a separate file listing backend types 2025-09-26 15:21:49 +02:00