Re: Vacuum full connection exhaustion

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Christophe Pettus <xof(at)thebuild(dot)com>
Cc: Costa Alexoglou <costa(at)dbtune(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Vacuum full connection exhaustion
Date: 2024-08-08 23:02:19
Message-ID: CAApHDvrLiwiB8o+3R2M4JbwyovhD7Btt0h=+8_d85Lt+oxoy7Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 9 Aug 2024 at 02:12, Christophe Pettus <xof(at)thebuild(dot)com> wrote:
> VACUUM FULL takes an exclusive lock on the table that it is operating on. It's possible that a connection becomes blocked on that exclusive lock waiting for the VACUUM FULL to finish, the application sees the connection stopped and fires up another one (this is common in container-based applications), that one blocks... until all of the connections are full 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2024-08-09 04:15:33 Re: Vacuum full connection exhaustion
Previous Message Greg Sabino Mullane 2024-08-08 20:45:18 Re: Getting specific partition from the partition name