Re: autovacuum locking question

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Mike Schanne <mschanne(at)kns(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: autovacuum locking question
Date: 2019-12-06 17:49:34
Message-ID: 20191206174934.GR2082@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Dec 05, 2019 at 06:49:06PM -0500, Tom Lane wrote:
> The only part that would get canceled in response to somebody taking a
> non-exclusive lock is the last step, which is truncation of unused blocks at
> the end of the table; that requires an exclusive lock.

On Thu, Dec 05, 2019 at 06:55:02PM -0500, Jeff Janes wrote:
> If the vacuum finds a lot of empty pages at the end of the table, it will
> try to truncate them and takes a strong lock to do so.

Should the exclusive lock bit be documented ?
https://www.postgresql.org/docs/12/explicit-locking.html

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message MichaelDBA 2019-12-06 17:50:44 Re: autovacuum locking question
Previous Message Jeff Janes 2019-12-06 17:47:56 Re: autovacuum locking question