Re: Vacuum full connection exhaustion - Mailing list pgsql-general

From David Rowley
Subject Re: Vacuum full connection exhaustion
Date
Msg-id CAApHDvrLiwiB8o+3R2M4JbwyovhD7Btt0h=+8_d85Lt+oxoy7Q@mail.gmail.com
Whole thread Raw
In response to Re: Vacuum full connection exhaustion  (Christophe Pettus <xof@thebuild.com>)
Responses Re: Vacuum full connection exhaustion
List pgsql-general
On Fri, 9 Aug 2024 at 02:12, Christophe Pettus <xof@thebuild.com> wrote:
> VACUUM FULL takes an exclusive lock on the table that it is operating on.  It's possible that a connection becomes
blockedon that exclusive lock waiting for the VACUUM FULL to finish, the application sees the connection stopped and
firesup another one (this is common in container-based applications), that one blocks... until all of the connections
arefull of queries waiting on that VACUUM FULL. 

I also imagine this is the cause. One way to test would be to do:
BEGIN; LOCK TABLE <name of table>; and see if the connections pile up
in a similar way to when the VACUUM FULL command is used.

David



pgsql-general by date:

Previous
From: Greg Sabino Mullane
Date:
Subject: Re: Getting specific partition from the partition name
Next
From: Ron Johnson
Date:
Subject: Re: Vacuum full connection exhaustion