Use "COPY table TO" for partitioned tables in initial table synchronization.
authorMasahiko Sawada <msawada@postgresql.org>
Thu, 20 Nov 2025 22:50:27 +0000 (14:50 -0800)
committerMasahiko Sawada <msawada@postgresql.org>
Thu, 20 Nov 2025 22:50:27 +0000 (14:50 -0800)
commit266543a62055541ddefe4e66797e0e1e4aa8705a
tree6a49263e8575f97e96bb7da472aa3978cb69ab11
parent1e14edcea5e1a122d4bf76d30fc963715e4dfe5e
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
src/backend/replication/logical/tablesync.c