From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Alex Matzinger <amatzinger@experts-exchange.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6571: Postgres Kills 'Select 1' query randomly on hot standby databases
Date: Tue, 03 Apr 2012 11:41:38 -0500
Message-ID: <4F7AE1F20200002500046B1C@gw.wicourts.gov> (raw)
In-Reply-To: <4F7B2050.9000507@experts-exchange.com>
References: <E1SEqb9-0004Ou-Rl@wrigleys.postgresql.org>
<4F7A9D87.9060708@enterprisedb.com>
<4F7B2050.9000507@experts-exchange.com>
Alex Matzinger <amatzinger@experts-exchange.com> wrote:
> The connection that is executing the SELECT 1 are generally open
> for 1-5 hours before they are killed. The specific connection
> only executes SELECT 1. The transaction is simply BEGIN, and then
> SELECT 1's, no other query is executed.
Don't do that.
In particular, never put more into a single database transaction
than is required for integrity; and there is no apparent reason why
running a series of "SELECT 1" statements needs to be in a single
transaction. (It's not blindingly obvious why you would want to do
it in general, but I can imagine it possibly being useful for
monitoring purposes.)
-Kevin
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: Kevin.Grittner@wicourts.gov, heikki.linnakangas@enterprisedb.com, amatzinger@experts-exchange.com
Subject: Re: BUG #6571: Postgres Kills 'Select 1' query randomly on hot standby databases
In-Reply-To: <4F7AE1F20200002500046B1C@gw.wicourts.gov>
References: <E1SEqb9-0004Ou-Rl@wrigleys.postgresql.org> <4F7A9D87.9060708@enterprisedb.com> <4F7B2050.9000507@experts-exchange.com> <4F7AE1F20200002500046B1C@gw.wicourts.gov>
* 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