Re: Strange deadlock with object/target of lock : transaction

2025-08-25 Thread Laurenz Albe
On Mon, 2025-08-25 at 15:40 +0100, Achilleas Mantzios wrote: > > > > > We've been hit by a weird deadlock which it took me some days to > > > > > isolate and replicate. > > > > > It does not have to do with order of updates or any explicit > > > > > TABLE-level locking, > > > > > the objects/targ

Re: Q: GRANT ... WITH ADMIN on PG 17

2025-08-25 Thread DINESH NAIR
Hi , Found this interesting : "gm-dbo" can manage membership in "gm-doctors" (ADMIN TRUE), but does not inherit the role's privileges, nor can "gm-dbo" assume the identity of "gm-doctors". INHERIT option should be used in caution to reduce the risk of privilege escalation, especially for sens

Re: DISABLE TRIGGER doc wrong?

2025-08-25 Thread Adrian Klaver
On 8/25/25 10:24, Dominique Devienne wrote: On Mon, Aug 25, 2025 at 7:13 PM Pavel Luzanov wrote: On 25.08.2025 19:19, Dominique Devienne wrote: Simple experiment shows that it is still up to date: alice@postgres(17.5)=> alter table t disable trigger "RI_ConstraintTrigger_a_1260370"; ERROR:

Re: DISABLE TRIGGER doc wrong?

2025-08-25 Thread Dominique Devienne
On Mon, Aug 25, 2025 at 7:13 PM Pavel Luzanov wrote: > On 25.08.2025 19:19, Dominique Devienne wrote: > Simple experiment shows that it is still up to date: > alice@postgres(17.5)=> alter table t disable trigger > "RI_ConstraintTrigger_a_1260370"; > ERROR: permission denied: "RI_ConstraintTrigg

Re: DISABLE TRIGGER doc wrong?

2025-08-25 Thread Pavel Luzanov
On 25.08.2025 19:19, Dominique Devienne wrote: Fromhttps://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTABLE-DESC-DISABLE-ENABLE-TRIGGER: Disabling or enabling internally generated constraint triggers requires superuser privileges We were disabling triggers as the owner of the

Re: DISABLE TRIGGER doc wrong?

2025-08-25 Thread Dominique Devienne
On Mon, Aug 25, 2025 at 6:33 PM Dominique Devienne wrote: > On Mon, Aug 25, 2025 at 6:24 PM Adrian Klaver > wrote: > > On 8/25/25 09:19, Dominique Devienne wrote: > > > or I'm reading it wrong? --DD > > > > > > From > > > https://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTAB

Re: DISABLE TRIGGER doc wrong?

2025-08-25 Thread Dominique Devienne
On Mon, Aug 25, 2025 at 6:24 PM Adrian Klaver wrote: > On 8/25/25 09:19, Dominique Devienne wrote: > > or I'm reading it wrong? --DD > > > > From > > https://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTABLE-DESC-DISABLE-ENABLE-TRIGGER: > >> Disabling or enabling internally gene

Re: DISABLE TRIGGER doc wrong?

2025-08-25 Thread Adrian Klaver
On 8/25/25 09:19, Dominique Devienne wrote: or I'm reading it wrong? --DD From https://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTABLE-DESC-DISABLE-ENABLE-TRIGGER: Disabling or enabling internally generated constraint triggers requires superuser privileges We were disabl

DISABLE TRIGGER doc wrong?

2025-08-25 Thread Dominique Devienne
or I'm reading it wrong? --DD >From >https://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTABLE-DESC-DISABLE-ENABLE-TRIGGER: > Disabling or enabling internally generated constraint triggers requires > superuser privileges We were disabling triggers as the owner of the table just

Re: Strange deadlock with object/target of lock : transaction

2025-08-25 Thread Achilleas Mantzios
On 25/8/25 17:58, Adrian Klaver wrote: On 8/25/25 07:40, Achilleas Mantzios wrote: On 8/20/25 14:59, Achilleas Mantzios wrote: On 8/14/25 16:01, Achilleas Mantzios wrote: Hi Adrian On 8/14/25 15:39, Adrian Klaver wrote: On 8/14/25 00:07, Achilleas Mantzios wrote: Hi All We've been hit

Re: Strange deadlock with object/target of lock : transaction

2025-08-25 Thread Adrian Klaver
On 8/25/25 07:40, Achilleas Mantzios wrote: On 8/20/25 14:59, Achilleas Mantzios wrote: On 8/14/25 16:01, Achilleas Mantzios wrote: Hi Adrian On 8/14/25 15:39, Adrian Klaver wrote: On 8/14/25 00:07, Achilleas Mantzios wrote: Hi All We've been hit by a weird deadlock which it took me some

Re: Strange deadlock with object/target of lock : transaction

2025-08-25 Thread Achilleas Mantzios
On 8/20/25 14:59, Achilleas Mantzios wrote: On 8/14/25 16:01, Achilleas Mantzios wrote: Hi Adrian On 8/14/25 15:39, Adrian Klaver wrote: On 8/14/25 00:07, Achilleas Mantzios wrote: Hi All We've been hit by a weird deadlock which it took me some days to isolate and replicate. It does not

Re: Streaming replica hangs periodically for ~ 1 second - how to diagnose/debug

2025-08-25 Thread hubert depesz lubaczewski
On Fri, Aug 22, 2025 at 11:55:18AM -0400, Tom Lane wrote: > hubert depesz lubaczewski writes: > > On Fri, Aug 22, 2025 at 11:21:22AM -0400, Tom Lane wrote: > >> Interesting. That futex call is presumably caused by interaction > >> with some other process within the standby server, and the only >

Re: Q: GRANT ... WITH ADMIN on PG 17

2025-08-25 Thread Dominique Devienne
On Mon, Aug 25, 2025 at 2:22 PM Pavel Luzanov wrote: >> On 22.08.2025 11:40, Laurenz Albe wrote: >> Yes, that should work as follows: [...] > [...] A safer option is to use security definer function to grant membership FWIW, it's basically what I did. My primary "admin" application role lost CR

Re: Q: GRANT ... WITH ADMIN on PG 17

2025-08-25 Thread Pavel Luzanov
On 22.08.2025 11:40, Laurenz Albe wrote: - gm-dbo: user role for a DBA admin (not! superuser) - gm-bones: user role for a LLAP doctor - gm-doctors: group role for doctors, upon which are resting   access permissions for clinical data - gm-bones is to be a member of gm-doctors in order to access