| From: | Ajin Cherian <itsajin(at)gmail(dot)com> |
|---|---|
| To: | Cagri Biroglu <cagri(dot)biroglu(at)adyen(dot)com> |
| Cc: | "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, "smithpb2250(at)gmail(dot)com" <smithpb2250(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> |
| Subject: | Re: Per-table resync for logical replication subscriptions |
| Date: | 2026-08-25 04:51:58 |
| Message-ID: | CAFPTHDYpM0QfuARAa7Pzx=zKnJY6e527=bAO7=Rfg2wCLb27xA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Aug 19, 2026 at 9:10 PM Cagri Biroglu <cagri(dot)biroglu(at)adyen(dot)com> wrote:
>
> Hello Hayato,
>
> Thank you for the review, v5 is attached.
>
Hello Cagri,
Some minor comments:
1. The header above CheckRefreshTableNotInOtherSubscriptions() has two
sets of comments, the first one I feel is meant for
AlterSubscription_refresh_table() which is without a header.
2.
+ /*
+ * The local copy is discarded below, so require the same privilege
+ * TRUNCATE itself would.
+ */
+ aclresult = pg_class_aclcheck(relid, GetUserId(), ACL_TRUNCATE);
+ if (aclresult != ACLCHECK_OK)
+ aclcheck_error(aclresult, get_relkind_objtype(get_rel_relkind(relid)),
+ rv->relname);
rather than doing it this way, I believe you need to call
truncate_check_rel(relid, rel->rd_rel);
truncate_check_perms(relid, rel->rd_rel);
truncate_check_activity(rel);
else you will miss out on checking for temp tables of other backends
and invoking InvokeObjectTruncateHook(relid) which are object access
hooks.
regards,
Ajin Cherian
Fujitsu Australia
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Amit Kapila | 2026-08-25 04:52:12 | Re: Assertion failure in GetSubscriptionRelations() with concurrent DROP TABLE |
| Previous Message | Fujii Masao | 2026-08-25 04:44:35 | Re: doc: Reformat SELECT queries using GRAPH_TABLE |