Re: [PATCH v1] Fix initial sync of zero-column published tables

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Mingjie Gao <mingjie(dot)gmj(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH v1] Fix initial sync of zero-column published tables
Date: 2026-11-19 00:07:44
Message-ID: CAHut+PvJ1gtgqU87stYjkZFaiM1qj-TSXYHhotn_k2TvvN0oAg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Some minor comments for v4-0001.

======
Commit Message

1.
You don't need to document version changes in the commit message.

======
src/backend/commands/copyfrom.c

2.
+/*
+ * Wrapper for BeginCopyFromExtended() with attnamelist_is_explicit = false.
+ *
+ * A NIL attnamelist selects all target columns that are neither dropped nor
+ * generated.
+ */

The phrase "are neither dropped nor generated" felt awkward.

SUGGESTION
If attnamelist is NIL, select all columns of the relation, except
dropped or generated columns.

~~~

BeginCopyFromExtended:

3.
+ * 'attnamelist': List of char *, columns to include.

Maybe should also say "see 'attnamelist_is_explicit'".

~~~

4.
+ * 'attnamelist_is_explicit': If true, a NIL attnamelist means zero input
+ * columns. Otherwise, NIL selects all target columns that are neither
+ * dropped nor generated. This is needed when a logical replication source
+ * has no columns.

(Similar tweak as for review comment #2)

...
"Otherwise, NIL attnamelist means all columns of the relation, except
dropped or generated columns."

======
src/test/subscription/t/008_diff_schema.pl

5.
+# Clean up before creating the FOR ALL TABLES publication.

IMO, this comment only needs to say "Clean up". You don't need to
refer to other tests outside of this patch.

======
Kind Regards,
Peter Smith.
Fujitsdu Australia

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joao Rito 2026-11-19 00:18:17 Re: XMLTable treats a column of a domain over xml as a non-xml column
Previous Message Joao Rito 2026-11-18 23:58:32 Re: Backend crash in expanded_record_info functions