| From: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
|---|---|
| To: | vignesh C <vignesh21(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shvetamalik(at)gmail(dot)com> |
| Subject: | Re: Show the conflict log table in \dRs+ output |
| Date: | 2026-12-02 09:20:03 |
| Message-ID: | CAJpy0uDD50rFUoTwLemD5+3OwOYHvCdMiHpbG26zmbMETC+bzA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Dec 2, 2026 at 12:16 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
> Hi,
>
> Attached is a patch that makes \dRs+ show the conflict log table of a
> subscription as a footer, when conflict_log_destination is set to
> table or all. The name is displayed because the conflict log table is
> a relation that users query directly for diagnostic purposes, making
> it useful to have its name readily visible. It is displayed as a
> footer, following the style of existing \dRp+ footers (for example,
> "Tables from schemas:"). To accommodate this, \dRs+ now displays each
> subscription in a separate table, with the subscription name as its
> title. The output of \dRs without + remains unchanged. The footer is
> titled "Conflict log table:". This approach follows the discussion at
> [1].
>
> This is the same patch as v97 at [2], except for one new test to
> verify the CLT is included as a subscription footer.
>
> [1] https://www.postgresql.org/message-id/CAA4eK1KdKqKkaTqcj3in6ehD_hg6oOaCF_-JsVfd8N6nS8oV9g%40mail.gmail.com
> [2] https://www.postgresql.org/message-id/1257417f-cc58-4039-b8a9-498ff361ebf1%40gmail.com
>
Thanks for the patch. A few initial comments:
1)
The CLT name shown depends on search_path. If search_path does not
include the pg_conflict schema, it shows:
\dRs+
...
Conflict log table:
pg_conflict.pg_conflict_log_16402
But if pg_conflict is added to search_path, it shows:
\dRs+
...
Conflict log table:
pg_conflict_log_16402
This is inconsistent with \dRp+, which always shows the schema name of
the published tables, irrespective of search_path. Shall we build the
name as n.nspname || '.' || c.relname (as \dRp+ does) instead of using
subconflictlogrelid::regclass::text?
2)
\dRs+ with no subscriptions now prints the error "Did not find any
subscriptions.", whereas earlier it printed an empty table. That is
okay, as it is now consistent with \dRp+. But the doc only says "an
error is reported if no subscription matches the pattern", which IMO
does not cover this case where we run it without a pattern. Let me
know if I misunderstood this.
thanks
Shveta
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zhijie Hou | 2026-12-02 09:25:38 | Re: Show the conflict log table in \dRs+ output |
| Previous Message | Amit Kapila | 2026-12-02 09:17:00 | Re: DOC: Minor updates for logical replication conflicts |