RE: Initial COPY of Logical Replication is too slow

From: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
To: 'Masahiko Sawada' <sawada(dot)mshk(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Jan Wieck <jan(at)wi3ck(dot)info>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: RE: Initial COPY of Logical Replication is too slow
Date: 2026-03-27 03:16:29
Message-ID: OS9PR01MB1214992889432F8A936AAAA32F557A@OS9PR01MB12149.jpnprd01.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Sawada-san,

> When passing a non-existent publication name, the current behavior
> raises an error while the new behavior does nothing (i.e., the
> difference is calling GetPublicationByName() with missing_ok = true or
> false).

To confirm; It's because in PG18-, p.pubname was chosen from the pg_publication
in the publisher, but this patch the name list is taken from the subscriber, right?
If some publications are dropped on the publisher, the ERROR could be raised.

For the backward compatibility I suggest switching the policy based on the API
version. E.g.,

```
static Datum
pg_get_publication_tables(FunctionCallInfo fcinfo, ArrayType *pubnames,
- Oid target_relid)
+ Oid target_relid, bool missing_ok)
...
@@ -1631,7 +1631,7 @@ Datum
pg_get_publication_tables_a(PG_FUNCTION_ARGS)
{
/* Get the information of the tables in the given publications */
- return pg_get_publication_tables(fcinfo, PG_GETARG_ARRAYTYPE_P(0), InvalidOid);
+ return pg_get_publication_tables(fcinfo, PG_GETARG_ARRAYTYPE_P(0), InvalidOid, false);
```

Another comment for publication.sql.

```
-- Clean up
DROP FUNCTION test_gpt(text, text);
```

It should be test_gpt(text[], text);

Best regards,
Hayato Kuroda
FUJITSU LIMITED

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2026-03-27 03:19:37 Re: [PATCH v1] Fix typos in pg_bsd_indent: "dont" -> "don't" in comments Anexo: o arquivo
Previous Message Yugo Nagata 2026-03-27 03:00:57 Re: Add comments about fire_triggers argument in ri_triggers.c