Re: Timing out A Blocker Based on Time or Count of Waiters

2024-03-25 Thread Merlin Moncure
On Fri, Mar 22, 2024 at 11:25 AM Fred Habash wrote: > Facing an issue where sometimes humans login to a database and run DDL > statements causing a long locking tree of over 1000 waiters. As a > workaround, we asked developers to always start their DDL sessions > with 'SET lock_timeout = 'Xs'. >

Re: Timing out A Blocker Based on Time or Count of Waiters

2024-03-22 Thread Adrian Klaver
On 3/22/24 12:41, Fred Habash wrote: Lock tree: All PID's waiting on a lock held by/blocked by single blocker PID. Similar to what you see in the output of this script: https://github.com/dataegret/pg-utils/blob/master/sql/locktree.sql

Re: Timing out A Blocker Based on Time or Count of Waiters

2024-03-22 Thread Fred Habash
Lock tree: All PID's waiting on a lock held by/blocked by single blocker PID. Similar to what you see in the output of this script: https://github.com/dataegret/pg-utils/blob/master/sql/locktree.sql . It uses the dot connotation to draw a tree. Waiters: The PID (first column) returned by this quer

Re: Timing out A Blocker Based on Time or Count of Waiters

2024-03-22 Thread Christophe Pettus
> On Mar 22, 2024, at 09:25, Fred Habash wrote: > > Facing an issue where sometimes humans login to a database and run DDL > statements causing a long locking tree of over 1000 waiters. As a workaround, > we asked developers to always start their DDL sessions with 'SET lock_timeout > = 'Xs'

Re: Timing out A Blocker Based on Time or Count of Waiters

2024-03-22 Thread Adrian Klaver
On 3/22/24 09:25, Fred Habash wrote: Facing an issue where sometimes humans login to a database and run DDL statements causing a long locking tree of over 1000 waiters. As a The above needs more explanation: 1) Define locking tree. 2) Define waiters. 3) Provide examples of the DDL. workar

Timing out A Blocker Based on Time or Count of Waiters

2024-03-22 Thread Fred Habash
Facing an issue where sometimes humans login to a database and run DDL statements causing a long locking tree of over 1000 waiters. As a workaround, we asked developers to always start their DDL sessions with 'SET lock_timeout = 'Xs'. I reviewed the native lock timeout parameter in Postgres and fo