| From: | vignesh C <vignesh21(at)gmail(dot)com> |
|---|---|
| To: | Zhijie Hou <houzhijie22(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Show the conflict log table in \dRs+ output |
| Date: | 2026-12-02 13:29:08 |
| Message-ID: | CALDaNm1x5Qj_hTYAS7eVh1bTqc5nSgPbMH8+JCTjXu+_7fPWjw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, 2 Dec 2026 at 14:55, Zhijie Hou <houzhijie22(at)gmail(dot)com> wrote:
>
>
> Thanks for sharing the patch.
>
> For the patch, I think it is unnecessary to split
> describeSubscriptions() into listSubscriptions() and
> describeSubscriptions() which duplicates all the column headers and
> server-version checks to populate printTable manually. (Most neighboring
> functions in describe.c take a (pattern, verbose) interface)
>
> We can avoid that duplication and preserve the existing formatting by
> keeping a single describeSubscriptions(pattern, verbose) function,
> fetching conflict_log_table as a trailing internal column when verbose
> is set, and populating each subscription's printTable from the PGresult
> metadata (PQfname(), PQftype(), and column_type_alignment()). I've
> attached a top-up patch (nocfbot-0001) to illustrate this.
>
The earlier changes followed the same approach as \dRp, but your
suggestion simplifies the patch. I've incorporated your changes.
> For the doc:
>
> 2. doc/src/sgml/ref/psql-ref.sgml
>
> + If the subscription logs conflicts to a table (see
> + <xref
> linkend="sql-createsubscription-params-with-conflict-log-destination"/>),
>
> Since the target <varlistentry>'s <term> includes "(<type>enum</type>)"
> and has no xreflabel, "(see <xref .../>)" renders as
> "(see conflict_log_destination (enum))". I think it would be better to
> use <link> as in other places to avoid the nested "(enum)":
Modified
The attached v2 version patch has the changes for the same. This
version also fixes Shveta's alignment issue from [1].
[1] - https://www.postgresql.org/message-id/CAJpy0uB_%3Df6MCg9vU4f6QGeHq7JLbLdDKoGYgktXqqr9Ro29WQ%40mail.gmail.com
Regards,
Vignesh
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Add-conflict-log-table-information-to-describe-su.patch | application/octet-stream | 70.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | vignesh C | 2026-12-02 13:33:36 | Re: Show the conflict log table in \dRs+ output |
| Previous Message | Rui Zhao | 2026-12-02 13:28:31 | Re: memory leak in bounded sorts |