From: ddv <degtyaryov@gmail.com>
To: pgsql-bugs@postgresql.org
Subject: Re: automatic vacuum on pg_statistic pg_toast area blocks all queries in hot standby
Date: Tue, 23 Sep 2014 11:40:27 -0700 (PDT)
Message-ID: <1411497627467-5820183.post@n5.nabble.com> (raw)
In-Reply-To: <1411494429599-5820171.post@n5.nabble.com>
References: <1402622597307-5807143.post@n5.nabble.com>
<1411492718058-5820168.post@n5.nabble.com>
<1411494429599-5820171.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
> Secondly, where do you run "select txid_current() into res1" and "select
txid_current() into res2" ?
It does not matter where. Important to count the number of transactions that
takes place during max_standby_streaming_delay. Example res2-res1 = 25000,
my value vacuum_defer_cleanup_age = 40000
> Even if you set MASTER vacuum_defer_cleanup_age to certain value,
> autovacuum still can kick in anytime and may conflict query on the target
> table. So setting vacuum_defer_cleanup_age to a value can really reduce
> the chance of such situation?
Due to this parameter, at the time when Autovacuum clean the dead rows they
will be dead on the slave, and thus no queries will not use them. Therefore,
the conflict will not be.
> Moreover, in my post, the vacuum is on pg_statistic toast area, why did it
> block queries on SLAVE?
Autovacuum serves all tables, including a pg_catalog. This problem occurs on
any table. For example pg_class or my_table. Autovacuum remove rows in
moment AccessShareLock, this is row and unlock AccessShare receive to slave
with WAL. WAL not recorded on slave due to a conflict recovery. At the same
time queries are waiting for a lock on the slave.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/automatic-vacuum-on-pg-statistic-pg-toast-area-blocks-all-qu...
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.
--
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: degtyaryov@gmail.com
Subject: Re: automatic vacuum on pg_statistic pg_toast area blocks all queries in hot standby
In-Reply-To: <1411497627467-5820183.post@n5.nabble.com>
References: <1402622597307-5807143.post@n5.nabble.com> <1411492718058-5820168.post@n5.nabble.com> <1411494429599-5820171.post@n5.nabble.com> <1411497627467-5820183.post@n5.nabble.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