| From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
|---|---|
| To: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
| Cc: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Proposal: Conflict log history table for Logical Replication |
| Date: | 2026-07-01 07:14:53 |
| Message-ID: | CAFiTN-s-7Dse7=BgVv6JKTTU_oy6_jufw9OJTk5y4M09fBLC-w@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Jul 1, 2026 at 12:04 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> On Tue, Jun 30, 2026 at 5:20 PM Dilip Kumar <dilipbalaut(at)gmail(dot)com> wrote:
> >
> >
> > I have merged these patches and also merged 0001 and 0002. Also fixed
> > other open comments from Nisha, Shlok, and Peter
> >
>
> These are not needed:
>
> +++ b/src/include/replication/conflict.h
> +#include "catalog/pg_type.h"
>
> +++ b/src/backend/commands/lockcmds.c
> +#include "catalog/catalog.h"
>
> Plus we can have relevant docs added to this patch.
>
> I do not have any further comments on 001.
Thanks I have fixed these comments and also merged the docs. Apart
from those updates, I also missed the changes related to
pg_namespace_aclmask_ext [1], so I am adding them now. While Peter
suggested [2], that approach won't fix the revoke USAGE issue raised
by Nisha. We cannot simply return early here under the assumption that
ACL_USAGE is always allowed and ACL_CREATE is never allowed. Instead,
we need to mask ACL_CREATE and let the execution flow pass through for
other ACLs. This ensures that if ACL_USAGE has been explicitly
revoked, that revocation is correctly evaluated and respected.
[1]
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -3678,9 +3678,9 @@ pg_namespace_aclmask_ext(Oid nsp_oid, Oid roleid,
* Disallow creation in the conflict schema for everyone, including
* superusers, unless in binary-upgrade mode.
*/
- if (!IsBinaryUpgrade && (mask & ACL_CREATE) &&
- IsConflictLogTableNamespace(nsp_oid))
- return mask & ~ACL_CREATE;
+ if (!IsBinaryUpgrade && (mask & ACL_CREATE) &&
+ IsConflictLogTableNamespace(nsp_oid))
+ mask &= ~ACL_CREATE;
[2]
return mask & ACL_ALL_RIGHTS_SCHEMA & ~ACL_CREATE;
--
Regards,
Dilip Kumar
Google
| Attachment | Content-Type | Size |
|---|---|---|
| v61-0001-Add-configurable-conflict-log-table-for-Logical-.patch | application/octet-stream | 90.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Bertrand Drouvot | 2026-07-01 07:19:49 | Prevent crash when calling pgstat functions with unregistered stats kind |
| Previous Message | Chao Li | 2026-07-01 07:14:04 | Re: Fix psql pager selection for wrapped expanded output |