| From: | vignesh C <vignesh21(at)gmail(dot)com> |
|---|---|
| To: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
| Cc: | Amit Kapila <amit(dot)kapila16(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 11:02:00 |
| Message-ID: | CALDaNm3SQ+Uphk7Y3s-jHeii38bc6tBnxVybU6qu8jSZTKwimQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, 1 Dec 2026 at 09:55, shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> 5)
> + /*
> + * Do not emit "ALTER TABLE ... OWNER TO ..." for a conflict log table:
> + * changing its owner is not allowed. Its owner follows the owner of the
> + * subscription, and is set when the ALTER SUBSCRIPTION ... OWNER TO of
> + * the dump is restored.
> + */
>
> Last sentence is not true in all cases; ALTER SUBSCRIPTION ... OWNER
> TO is not dumped when --use-set-session-authorization is given. But
> pg_upgrade does not use that option, and dumpTableSchema() (IIUC) is
> not reached for a CLT in a regular pg_dump, but the comment does not
> make this clear, so it is half-true. Suggestion (if you agree):
>
> /*
> * Do not emit "ALTER TABLE ... OWNER TO ..." for a conflict log table, as
> * its owner cannot be changed. Such tables are dumped only for
> * pg_upgrade, where the restored ALTER SUBSCRIPTION ... OWNER TO also
> * sets the owner of the table. Note that ALTER SUBSCRIPTION ... OWNER TO
> * is not dumped with --use-set-session-authorization, but pg_upgrade does
> * not use that option.
> */
I agree with the points raised. However, --binary-upgrade is
documented as being for use by upgrade utilities only, and pg_upgrade
does not use --use-set-session-authorization, so I felt the current
comments seem ok.
The rest of the comments were fixed in the v4 version patch attached at [1].
[1] - https://www.postgresql.org/message-id/CALDaNm38Ek7KZNBH69-B8bxn5Yf9ukVejygcZE80cZueWSDUFQ%40mail.gmail.com
Regards,
Vignesh
| From | Date | Subject | |
|---|---|---|---|
| Next Message | vignesh C | 2026-12-01 11:03:53 | Re: Preserve conflict log table during upgrade |
| Previous Message | vignesh C | 2026-12-01 11:00:30 | Re: Preserve conflict log table during upgrade |