| 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-30 07:42:46 |
| Message-ID: | OS9PR01MB1214993716A59D343ADB9C039F552A@OS9PR01MB12149.jpnprd01.prod.outlook.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Dear Sawada-san,
Thanks for updating the patch. I think the patch has a good shape.
Below contains minor comments.
```
+ if (filter_by_relid)
+ relkind = get_rel_relkind(target_relid);
```
Can we return here if the relkind is not RELKIND_RELATION nor RELKIND_PARTITIONED_TABLE?
Key assumption here is that pg_get_publication_tables_b() returns at most one
tuple, thus this is would be called only once.
```
+ /*
+ * Non-alltables
+ */
+ if (relispartition)
```
else-if might be usalbe to clarify we're in the non-alltables case.
```
+ Assert(pubnames != NULL);
```
Personally I prefer to do Assert() before the SRF_FIRSTCALL_INIT(). Because it's
only related with argument and not related with other function calls.
```
+ proname => 'pg_get_publication_tables', prorows => '10',
```
Can prorows be 1? Because only a row would be returned here.
Best regards,
Hayato Kuroda
FUJITSU LIMITED
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim Jones | 2026-03-30 07:45:07 | Re: Add max_wal_replay_size connection parameter to libpq |
| Previous Message | Anton A. Melnikov | 2026-03-30 07:28:30 | .bc files build dependency issues. |