Re: BUG #6571: Postgres Kills 'Select 1' query randomly on hot standby databases - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: BUG #6571: Postgres Kills 'Select 1' query randomly on hot standby databases
Date
Msg-id 4F7AE1F20200002500046B1C@gw.wicourts.gov
Whole thread Raw
In response to Re: BUG #6571: Postgres Kills 'Select 1' query randomly on hot standby databases  (Alex Matzinger <amatzinger@experts-exchange.com>)
List pgsql-bugs
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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #6571: Postgres Kills 'Select 1' query randomly on hot standby databases
Next
From: John R Pierce
Date:
Subject: Re: BUG #6571: Postgres Kills 'Select 1' query randomly on hot standby databases