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

From: Mingjie Gao <mingjie(dot)gmj(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Peter Smith <smithpb2250(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-20 06:20:39
Message-ID: CAL5_ZS1BwS95AXyezbaLy2mq9emkOv7d=+vogCb5mAkU2gJOqw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Peter, Vignesh,

Peter, thanks for the comments. I've removed the version notes from the
patch, reworded the NIL comments in both COPY entry points, and added a
reference to attnamelist_is_explicit in the attnamelist description. The
test cleanup comment now just says “Clean up.”

no functional changes from v4 on master.

Vignesh, I've attached v5 for master (d94964f14f3) and a separate patch for
REL_15_STABLE (e5b33ff4514). The master patch also applies cleanly to PG16
through PG19. PG15 uses text for the initial copy, so the test checks the
subscriber default after the initial copy and again after a replicated
insert. Without the patch, neither of the two initially copied rows got the
default. With the patch, both did, as did the later insert.

I built all six branches with assertions enabled. The core regression tests/
file_fdw regression test, and the full subscription TAP suite passed on
master and PG15. On each of PG16 through PG19, 004_sync, 008_diff_schema,
014_binary, and 031_column_list passed.

Best regards,
mingjiegao

On Thu, 19 Nov 2026 10:05:29 +0530, vignesh C <vignesh21(at)gmail(dot)com> wrote:

On Wed, 18 Nov 2026 at 14:45, Mingjie Gao <mingjie(dot)gmj(at)gmail(dot)com> wrote: >
> Hi Vignesh, > > Thanks for the suggestion. I've expanded the commit
message to explain > why COPY treats an empty column list as unspecified,
the behavior in > text and binary mode, and how tablesync marks the list as
explicit. > > Attached is v4, rebased on master at f03a0f87963. There are
no code > changes from v3. With assertions enabled, the core regression
tests, > file_fdw regression test, and subscription TAP suite all passed.
Thanks for the updated version. This issue exists in all the supported
versions till PG15 branch, but the patch does not apply cleanly there.
Could you share a separate patch for PG15? Regards, Vignesh

Attachment Content-Type Size
nocfbot-v5-0001-PG15-Fix-initial-sync-of-zero-column-published-tables.patch application/octet-stream 7.7 KB
v5-0001-PG16-17-18-19-20devel-Fix-initial-sync-of-zero-column-published-tables.patch application/octet-stream 8.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Fujii Masao 2026-11-20 06:16:50 Re: psql: avoid over-reading unterminated prompt escapes