Initial COPY of Logical Replication is too slow

From: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Initial COPY of Logical Replication is too slow
Date: 2025-12-06 12:18:41
Message-ID: CAB-JLwbBFNuASyEnZWP0Tck9uNkthBZqi6WoXNevUT6+mV8XmA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
V1-Initial COPY of Logical Replication.diff application/octet-stream 2.6 KB

Browse pgsql-hackers by date

  From Date Subject
Previous Message Tomas Vondra 2025-12-06 12:04:20 Re: increased duration of stats_ext tests with -DCLOBBER_CACHE_ALWAYS