From: David F. Skoll <dfs@roaringpenguin.com>
To: pgsql-admin@postgresql.org
Subject: Hot-standby and canceled queries
Date: Wed, 24 Apr 2013 07:42:38 -0400
Message-ID: <20130424074238.2aa7f764@shishi.roaringpenguin.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Hi,
I ran a query on a hot-standby (PostgreSQL 9.1) and it was canceled as
per the documentation about vacuum cleanups on the master.
Second time testing, I started a transaction on the master (with
BEGIN) but my query on the hot-standby was still canceled.
Is that because a transaction doesn't "really" begin with BEGIN, but only
after the first real statement after the BEGIN? Is it sufficient to
use: BEGIN; SELECT ... ; to start a transaction on the master, or
do I need to use UPDATE or INSERT to ensure that a vacuum cleanup isn't
applied until the transaction is finished?
Or am I totally out of luck? The documentation says: "PostgreSQL
allows cleanup of old row versions when there are no transactions that
need to see them to ensure correct visibility of data according to
MVCC rules." So does that mean I can still run into trouble even with
an active transaction on the master?
I don't really want to set max_standby_streaming_delay very high, but that
will be the action of last resort.
Regards,
David.
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
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-admin@postgresql.org
Cc: dfs@roaringpenguin.com
Subject: Re: Hot-standby and canceled queries
In-Reply-To: <20130424074238.2aa7f764@shishi.roaringpenguin.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