Alex Matzinger <amatzin...@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

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to