agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Fix stale COPY progress during logical replication table sync
6+ messages / 1 participants
[nested] [flat]

* pgsql: Fix stale COPY progress during logical replication table sync
@ 2026-05-13 02:47 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Fujii Masao @ 2026-05-13 02:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/422e54e3092afd09997d27cc7c99598f91075b0d

Modified Files
--------------
src/backend/replication/logical/tablesync.c | 1 +
1 file changed, 1 insertion(+)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix stale COPY progress during logical replication table sync
@ 2026-05-13 02:47 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Fujii Masao @ 2026-05-13 02:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d9cd9b4d7e147fc4965195c765f191ac69593c43

Modified Files
--------------
src/backend/replication/logical/tablesync.c | 1 +
1 file changed, 1 insertion(+)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix stale COPY progress during logical replication table sync
@ 2026-05-13 02:47 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Fujii Masao @ 2026-05-13 02:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/f2acab53482cfd444c8ac23d317f90ad6f6b1a7f

Modified Files
--------------
src/backend/replication/logical/tablesync.c | 1 +
1 file changed, 1 insertion(+)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix stale COPY progress during logical replication table sync
@ 2026-05-13 02:47 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Fujii Masao @ 2026-05-13 02:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/d140237dab87557ff0079ab576e1d77d886578c9

Modified Files
--------------
src/backend/replication/logical/tablesync.c | 1 +
1 file changed, 1 insertion(+)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix stale COPY progress during logical replication table sync
@ 2026-05-13 02:47 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Fujii Masao @ 2026-05-13 02:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b5f7e7569c09ca31c0da94ead44985550cf68b30

Modified Files
--------------
src/backend/replication/logical/tablesync.c | 1 +
1 file changed, 1 insertion(+)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Fix stale COPY progress during logical replication table sync
@ 2026-05-13 02:47 Fujii Masao <fujii@postgresql.org>
  0 siblings, 0 replies; 6+ messages in thread

From: Fujii Masao @ 2026-05-13 02:47 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/e3c4e374648e033aa864e9b002090ac84b3d1aab

Modified Files
--------------
src/backend/replication/logical/tablesync.c | 1 +
1 file changed, 1 insertion(+)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2026-05-13 02:47 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-05-13 02:47 pgsql: Fix stale COPY progress during logical replication table sync Fujii Masao <fujii@postgresql.org>
2026-05-13 02:47 pgsql: Fix stale COPY progress during logical replication table sync Fujii Masao <fujii@postgresql.org>
2026-05-13 02:47 pgsql: Fix stale COPY progress during logical replication table sync Fujii Masao <fujii@postgresql.org>
2026-05-13 02:47 pgsql: Fix stale COPY progress during logical replication table sync Fujii Masao <fujii@postgresql.org>
2026-05-13 02:47 pgsql: Fix stale COPY progress during logical replication table sync Fujii Masao <fujii@postgresql.org>
2026-05-13 02:47 pgsql: Fix stale COPY progress during logical replication table sync Fujii Masao <fujii@postgresql.org>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox