On Sun, Mar 15, 2015 at 8:04 PM, Rui DeSousa <rui@crazybean.net> wrote:
> Would a parameter to auto terminate long running transactions be a better solution? Terminating the long running
transactionwould allow for the normal vacuuming process to cleanup the deleted records thus avoiding database bloat
withoutintroducing new semantics to Postgres's MVCC. I would also recommend that the default be disabled.
An advantage of Kevin's approach is that you don't have to abort *all*
long-running transactions, only those that touch data which has been
modified since then. If your system is read-mostly, that could
dramatically reduce the number of aborts.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company