| From: | Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
|---|---|
| To: | Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
| Cc: | Jan Wieck <jan(at)wi3ck(dot)info>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Initial COPY of Logical Replication is too slow |
| Date: | 2026-03-24 00:53:59 |
| Message-ID: | CALj2ACUswwdgrp8U=_EBRCv9qUJD+YUEHwbSziB2TE99Hc4SvA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Wed, Mar 18, 2026 at 4:29 PM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> I've attached the patch to implement this idea. The patch still
> introduces a new function but it overloads
> pg_get_publication_tables(). We might be able to handle different
> input (array or text) in pg_get_publication_tables() better, but it's
> enough for discussion at least.
Overall, the intent of this patch looks good to me. It avoids the cost
of the table sync worker querying all the pg_publication_rel tables to
filter them out later in the join.
I quickly reviewed the patch and here are some comments:
1/ Typo: s/pg_get_publication_table_info/pg_get_publication_tables
2/ I think it's good to have some quick numbers on how the query
latency looks for pre-V19 and the new one that the table sync worker
executes on the publisher, say, with 100, 1000, and 10000 tables at
least.
3/ + Assert(OidIsValid(target_relid));
Why not error out (by treating it as function input parameter
validation) when target_relid is invalid because asserts go unnoticed
on production systems?
--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Langote | 2026-03-24 00:59:33 | Re: Batching in executor |
| Previous Message | David Rowley | 2026-03-24 00:32:40 | Re: another autovacuum scheduling thread |