Initial COPY of Logical Replication is too slow
Marcos Pegoraro <marcos@f10.com.br>
From: Marcos Pegoraro <marcos@f10.com.br>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-12-06T12:18:41Z
Lists: pgsql-hackers
Attachments
- V1-Initial COPY of Logical Replication.diff (application/octet-stream)
Subscriber needs to ask publisher about tables and fields to COPY and it uses pg_get_publication_tables for that, and it is too slow when the number of tables is high because on every table it's subscribed it has to run this select. We can get the same result with a join on pg_publication_rel. regards Marcos