| From: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
|---|---|
| To: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
| Cc: | Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Peter Smith <smithpb2250(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>, shveta malik <shvetamalik(at)gmail(dot)com> |
| Subject: | Re: Proposal: Conflict log history table for Logical Replication |
| Date: | 2026-05-11 09:07:46 |
| Message-ID: | CAJpy0uANkzTyUjO2W0=RtaJCGg=VYcwLGGCpqax=zKJgNbB0Hw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Please see the test below:
CREATE USER user1 LOGIN ;
ALTER subscription sub1 owner to user1;
--Now as expected, user1 is able to access, delete or truncate:
postgres=> select count(*) from pg_conflict.pg_conflict_log_16387;
0
postgres=> delete from pg_conflict.pg_conflict_log_16387;
DELETE 0
--When user1 tries to do insert, it gets error:
postgres=> insert into pg_conflict.pg_conflict_log_16387 values (0);
ERROR: permission denied for table pg_conflict_log_16387
While superuser gets
postgres=# insert into pg_conflict.pg_conflict_log_16387 values (0);
ERROR: cannot modify or insert data into conflict log table
"pg_conflict_log_16387"
DETAIL: Conflict log tables are system-managed and only support
cleanup via DELETE or TRUNCATE.
-----
The error for user1 seems less intuitive as user1 owns
pg_conflict_log_16387. Shouldn't the non-superuser but the owner of
the CLT see the same error as the superuser is getting? I think the
error is due to the recent changes made in pg_class_aclmask_ext().
What do others think here?
thanks
Shveta
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jim Jones | 2026-05-11 09:25:47 | Re: COPY ON_CONFLICT TABLE; save duplicated record to another table. |
| Previous Message | Michael Paquier | 2026-05-11 08:11:45 | Re: Fix unsafe PlannedStmt access in pg_stat_statements |