| From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Honor inherited ownership when finishing prepared transactions |
| Date: | 2026-11-02 09:01:38 |
| Message-ID: | CALdSSPjQWc0z6CXBun6+_xppWeN_X=0U2iJr9E9KEQ-RLCgiuA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Recently started to use 2pc support in SPQR [0] for transactions that
need to modify data on several postgres(shards). So, for partially
committed 2pc we have a separate watchdog which finishes all half-done
transactions.
And we want a separate role for this watchdog. But this just fails to
finish transactions that were prepared. The reason is a two phase
check that compares user oid with tx owner oid with ==. This was the
original security restriction from [1] (valid at time), but didn't
change after [2]. Before [2], server had logic that only user himself
can do something with his object, for example dropping the table was
ONLY for owner. After [2], it use role membership etc. So, can we use
same in 2pc (prepared) tx? Is [1] sec restriction still true? I have
simple patch for this, didn't posted yet, want to hear back
[1]Discussion: https://www.postgresql.org/message-id/15495.1097685302@sss.pgh.pa.us
[2]Discussion: https://www.postgresql.org/message-id/26627.1119985659@sss.pgh.pa.us
[0] https://github.com/pg-sharding/spqr
--
Best regards,
Kirill Reshke
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Roman Khapov | 2026-11-02 09:11:53 | Re: pgbench --unlogged-tables silently ignored for branches/tellers/history when --partitions is used |
| Previous Message | Richard Guo | 2026-11-02 08:58:03 | Re: bug: query returns different result with and without memoization. |