pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: dimitri@2ndQuadrant.fr
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #13895: Hot Standby locked replaying auto vacuum against pg_catalog.pg_statistics
Date: Thu, 28 Jan 2016 13:53:51 +0100
Message-ID: <20160128125351.GA728572@alvherre.pgsql> (raw)
In-Reply-To: <20160128124257.2539.1850@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

dimitri@2ndQuadrant.fr wrote:

> 
> I witnessed a case where I had no time to extract information about it, so
> it's all from memory, sorry about that.
> 
> We had several Hot Standby nodes in 9.3.x used for load balancing read only
> queries. All queries were stuck, and pg_locks showed they were refused a
> lock against pg_catalog.pg_statistics.

My WAG is that this is related to the standby replaying the
AccessExclusive lock obtained to truncate pg_statistics.  That seems
consistent with the presented symptoms.

I would have assumed that the actual truncation shouldn't take a
particularly long time, so user processes on the standby wouldn't be
locked for long enough to cause visible trouble.  Maybe the table was
originally very bloated and a lot of pages got removed, leading the
replay process to take some time.  It is strange that it would be locked
for long enough to allow for manually querying pg_locks and
pg_stat_activity.

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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)  latest in thread

Message-ID: <20160128125351.GA728572@alvherre.pgsql>
Permalink:  ../20160128125351.GA728572@alvherre.pgsql/
Also on:    postgresql.org/message-id/20160128125351.GA728572@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-bugs@postgresql.org
  Cc: alvherre@2ndquadrant.com, dimitri@2ndQuadrant.fr
  Subject: Re: BUG #13895: Hot Standby locked replaying auto vacuum against pg_catalog.pg_statistics
  In-Reply-To: <20160128125351.GA728572@alvherre.pgsql>
  References: <20160128124257.2539.1850@wrigleys.postgresql.org> <20160128125351.GA728572@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