pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: Mike Schanne <mschanne@kns.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: autovacuum locking question
Date: Fri, 6 Dec 2019 11:49:34 -0600
Message-ID: <20191206174934.GR2082@telsasoft.com> (raw)
In-Reply-To: <CAMkU=1wmmOvKGC+_QqHBE=nM=nqPBq=DJrX8Sk3CeQ+krAcEkA@mail.gmail.com> <26221.1575589746@sss.pgh.pa.us>

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






view thread (13+ messages)  latest in thread

Message-ID: <20191206174934.GR2082@telsasoft.com>
Permalink:  ../20191206174934.GR2082@telsasoft.com/
Also on:    postgresql.org/message-id/20191206174934.GR2082@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: pryzby@telsasoft.com, tgl@sss.pgh.pa.us, jeff.janes@gmail.com, mschanne@kns.com
  Subject: Re: autovacuum locking question
  In-Reply-To: <20191206174934.GR2082@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox