Use "COPY table TO" for partitioned tables in initial table synchronization.

Masahiko Sawada <msawada@postgresql.org>

Commit: 266543a62055541ddefe4e66797e0e1e4aa8705a
Author: Masahiko Sawada <msawada@postgresql.org>
Date: 2025-11-20T22:50:27Z
Use "COPY table TO" for partitioned tables in initial table synchronization.

Commit 4bea91f added support for "COPY table TO" with partitioned
tables. This commit enhances initial table synchronization in logical
replication to use "COPY table TO" for partitioned tables if possible,
instead of "COPY (SELECT ...) TO" variant, improving performance.

Author: Ajin Cherian <itsajin@gmail.com>
Discussion: https://postgr.es/m/CAFPTHDY=w+xmEof=yyjhbDzaLxhBkoBzKcksEofXcT6EcjMbtQ@mail.gmail.com

Files

PathChange+/−
src/backend/replication/logical/tablesync.c modified +3 −2

Discussion