Re: transaction timeout

Lists: pgsql-general
From: Eugene Strulyov <eugene_s(dot)_at_(dot)corefa(dot)_dot_(dot)kill_all_spammers(at)corefa(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: transaction timeout
Date: 2003-09-26 16:48:53
Message-ID: 200309261248.54002.EugeneStrulyov<eugene_s_at_corefa_dot_kill_all_spammers>
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi everybody,

Our aplpication uses PostgreSQL for data store. We have a problem with the way
long-running transactions are handled.

Our application had a bug (from what I understand it went into an infinite
loop). As a result, the transaction it was processing was neither committed
nor rolled back. Because of that, the misbehaving process was left holding
the locks and none of the other processes were able to do transactions.

My question is, how do I get PostgreSQL to automatically abort transactions
that take longer than a certain timeout?

thanks in advance,

Eugene


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Eugene Strulyov <eugene_s(dot)_at_(dot)corefa(dot)_dot_(dot)kill_all_spammers(at)corefa(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: transaction timeout
Date: 2003-09-29 01:36:37
Message-ID: 200309290136.h8T1abk13329@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general


We have statement_timeout, but no transaction timeout. Does that help?

---------------------------------------------------------------------------

Eugene Strulyov wrote:
> Hi everybody,
>
> Our aplpication uses PostgreSQL for data store. We have a problem with the way
> long-running transactions are handled.
>
> Our application had a bug (from what I understand it went into an infinite
> loop). As a result, the transaction it was processing was neither committed
> nor rolled back. Because of that, the misbehaving process was left holding
> the locks and none of the other processes were able to do transactions.
>
> My question is, how do I get PostgreSQL to automatically abort transactions
> that take longer than a certain timeout?
>
> thanks in advance,
>
> Eugene
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073