pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Don Seiler <don@seiler.us>
Cc: Postgres General <pgsql-general@postgresql.org>
Subject: Re: Vacuum process waiting on BufferPin
Date: Mon, 13 Aug 2018 18:15:06 -0300
Message-ID: <20180813211506.spvawcczdukdxa4u@alvherre.pgsql> (raw)
In-Reply-To: <CAHJZqBDsH07idGPhdiMLVWVU5_YSGVo9DiVCFjNq21ZoBcP4Vg@mail.gmail.com>

On 2018-Aug-13, Don Seiler wrote:

> This afternoon I discovered an autovacuum process that had been running for
> over 6 days. It was waiting on BufferPin event. I kicked off a manual
> vacuum+analyze of the table, which automatically killed that autovacuum.
> This ran for a few minutes before it too was waiting on a BufferPin event.
> I've never witnessed a vacuum session waiting on BufferPin before.

Buffer pins are normally released quickly enough.  Of course, an
idle-in-transaction session has its own problems, but even those would
normally not have buffer pins; so vacuum would run to completion without
blocking, even if no tuples would be removed.

Maybe you had a cursor that was not fully scanned before the session was
left idle -- as I recall, those can leave buffers pinned.  

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services




view thread (10+ messages)  latest in thread

Message-ID: <20180813211506.spvawcczdukdxa4u@alvherre.pgsql>
Permalink:  ../20180813211506.spvawcczdukdxa4u@alvherre.pgsql/
Also on:    postgresql.org/message-id/20180813211506.spvawcczdukdxa4u@alvherre.pgsql

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: alvherre@2ndquadrant.com, don@seiler.us
  Subject: Re: Vacuum process waiting on BufferPin
  In-Reply-To: <20180813211506.spvawcczdukdxa4u@alvherre.pgsql>
  References: <CAHJZqBDsH07idGPhdiMLVWVU5_YSGVo9DiVCFjNq21ZoBcP4Vg@mail.gmail.com> <20180813211506.spvawcczdukdxa4u@alvherre.pgsql>

* 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