Hi, hackers.

Thanks for developing this great feature.
The documentation for the pg_publication catalog shows a 'pubgencols' column, 
but the actual column name is the 'pubgencols_type' column.
Also, the order of the columns in the documentation differs from the order of 
the columns in the actual pg_publication catalog.
The attached patch changes the column names and order in the documentation.

Regards,
Noriyoshi Shinoda
-----Original Message-----
From: Daniel Gustafsson <dan...@yesql.se> 
Sent: Thursday, January 23, 2025 9:45 PM
To: vignesh C <vignes...@gmail.com>
Cc: Amit Kapila <amit.kapil...@gmail.com>; Peter Smith <smithpb2...@gmail.com>; 
Michael Paquier <mich...@paquier.xyz>; Shinoda, Noriyoshi (SXD Japan FSI) 
<noriyoshi.shin...@hpe.com>; Shubham Khanna <khannashubham1...@gmail.com>; 
Masahiko Sawada <sawada.m...@gmail.com>; Rajendra Kumar Dangwal 
<dangwalrajendra...@gmail.com>; pgsql-hackers@lists.postgresql.org; 
eu...@eulerto.com
Subject: Re: Pgoutput not capturing the generated columns

> On 23 Jan 2025, at 13:19, vignesh C <vignes...@gmail.com> wrote:

> When dumping from Postgres <=PG17 servers, the query generated for 
> pubgencols_type incorrectly included the macro name instead of the 
> macro value. This resulted in dump failures. This commit fixes the 
> issue by correctly specifying the macro value in the query. The 
> attached patch has the changes for the same.

I was just looking at the Xversion test failure on crake (which has the log 
entry below) when I saw your email.

pg_dump: error: query failed: ERROR: column "publish_gencols_none" does not 
exist LINE 1: ...elete, false AS pubtruncate, false AS pubviaroot, PUBLISH_GE...
^
pg_dump: detail: Query was: SELECT p.tableoid, p.oid, p.pubname, p.pubowner, 
p.puballtables, p.pubinsert, p.pubupdate, p.pubdelete, false AS pubtruncate, 
false AS pubviaroot, PUBLISH_GENCOLS_NONE AS pubgencols_type FROM 
pg_publication p
pg_dumpall: error: pg_dump failed on database "template1", exiting

Your patch seems like a reasonable fix.

--
Daniel Gustafsson

Attachment: pg_publication_doc_v1.diff
Description: pg_publication_doc_v1.diff

Reply via email to