From: wayne+psql@lewisclan.org
To: pgsql-bugs@postgresql.org
Subject: BUG #13878: Hot Standby Query Conflict documentation leaves out a potential source of conflict errors
Date: Thu, 21 Jan 2016 05:05:37 +0000
Message-ID: <20160121050537.2738.12242@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 13878
Logged by: Wayne Lewis
Email address: wayne+psql@lewisclan.org
PostgreSQL version: 9.3.9
Operating system: Ubuntu 14.04
Description:
In 25.5.2 of the documentation the reasons for conflict errors are listed.
The first case is "Access Exclusive" which lists the ways an
AccessExclusiveLock can be taken on master which could conflict with queries
on the standby.
I think it should be noted there that even a lazy vacuum (and specifically
auto vacuum) can take AccessExclusiveLock when truncating free pages from a
relation, and that lock can produce a "User was holding a relation lock for
too long." error on the standby when the standby has long overlapping
queries on that relation.
I didn't realize until researching the source that auto vacuum can take an
AccessExclusiveLock in lazy_truncate_heap() and I suspect most users do not
realize that either.
While documentation to this effect would be very useful, is it possible to
go further and introduce a flag that disables truncation during lazy vacuum
whenever there is a standby? If there is no consequence to leaving those
pages I think users would prefer to control when an AccessExclusiveLock can
sneak into the WAL.
Thanks!
Wayne
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: wayne+psql@lewisclan.org
Subject: Re: BUG #13878: Hot Standby Query Conflict documentation leaves out a potential source of conflict errors
In-Reply-To: <20160121050537.2738.12242@wrigleys.postgresql.org>
References: <20160121050537.2738.12242@wrigleys.postgresql.org>
* 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