Re: can long-lived transactions cause problems?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Powell <david(at)drp(dot)id(dot)au>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: can long-lived transactions cause problems?
Date: 2009-08-05 01:12:52
Message-ID: 25891.1249434772@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

David Powell <david(at)drp(dot)id(dot)au> writes:
> I have an application which is using long idle transactions. Whenever
> a transaction is commited, a new transaction is started which may then
> sit idle until the next client access.

This is generally considered bad application design. Long-lived
transactions are a bad idea and definitely can hurt the performance of
other stuff.

Depending on which client library and PG version you are using,
issuing a BEGIN and then doing nothing for a long time might not hurt
you, but I can't recommend it.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Andreas Wenk 2009-08-05 06:51:54 Re: Graphical user interface
Previous Message Tom Lane 2009-08-05 01:09:36 Re: Trigger function volatility