| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
| Cc: | vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shvetamalik(at)gmail(dot)com> |
| Subject: | Re: Preserve conflict log table during upgrade |
| Date: | 2026-12-01 06:54:37 |
| Message-ID: | CAA4eK1LD+kM6dyJ_0POnUOyJKehoJO5xZQV9W+=CfwdeFfDE_A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Dec 1, 2026 at 11:20 AM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> On Tue, Dec 1, 2026 at 9:55 AM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
> >
> > >
> > > Here is a rebased version, the v3 version patch also addresses Ajin's
> > > comments from [1] and Kuroda-san's comments from [2].
> > > [1] - https://www.postgresql.org/message-id/CAFPTHDZkvegyxt_P%3DtYqjKmUNHhRcGcgvQ-rE7oFr%3Dx2qCPtxQ%40mail.gmail.com
> > > [2] - https://www.postgresql.org/message-id/OS7PR01MB18317D4778448CA0BE8AE2B2CF54E2%40OS7PR01MB18317.jpnprd01.prod.outlook.com
> > >
> >
> > Thanks for the patch. Below are a few comments. I will verify the
> > patch a bit more in sometime.
> >
>
> I verified a bit more. Once concern:
>
> $ ./pg_dump -d postgres -t pg_conflict.pg_conflict_log_16390 -p 5434
> pg_dump: error: no matching tables were found
>
> $ ./pg_dump -d postgres -n pg_conflict -p 5434
> pg_dump: error: no matching schemas were found
>
> $ ./pg_dump -d postgres -t pg_conflict.pg_conflict_log_16390
> --binary-upgrade -p 5434
> pg_dump: error: no matching tables were found
>
> $ ./pg_dump -d postgres -n pg_conflict --binary-upgrade -p 5434
> pg_dump: error: no matching schemas were found
>
> All these commands report that no matching table or schema was found,
> although both exist, and that is why the user is trying to select them
> in the first place. The error is misleading.
>
> So either we stop filtering them out in the queries of
> expand_table_name_patterns() and expand_schema_name_patterns(), and
> instead skip them while processing the results, with a WARNING (e.g.
> "ignoring conflict log table ... as it can only be dumped by
> pg_upgrade"), or we at least mention it in the doc, just briefly:
>
> ... pg_dump does not dump its conflict log table or its contents, and
> neither the table nor the pg_conflict schema can be selected with -t
> or -n.
>
> Since the code change to emit the warning could be tricky, we can at
> least go with the doc change.
>
+1 for docs change. I think there is no use dumping the CLT table in
non-binary upgrade mode (aka outside pg_upgrade) as we won't be able
maintain the subscription's OID and anyway we won't allow any DDL
operations on such tables. See attached, this contains some other
cosmetic changes like removing the is_conflict_log_table() as it is
used at one place and changing comments at few places.
--
With Regards,
Amit Kapila.
| Attachment | Content-Type | Size |
|---|---|---|
| nocfbot-v3-amit.1.patch | application/octet-stream | 5.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-12-01 07:08:50 | pg_upgrade: fix use-after-close in cleanup_output_dirs() |
| Previous Message | Xueyu Gao | 2026-12-01 06:45:41 | pg_upgrade: backslash escaping in check_for_unicode_update() |