[prev in list] [next in list] [prev in thread] [next in thread]
List: postgresql-general
Subject: Re: idle_in_transaction_session_timeout for a set of SQL statements
From: Jeremy Finzel <finzelj () gmail ! com>
Date: 2019-02-27 16:51:48
Message-ID: CAMa1XUhCFu4SxHpX0Ef3xaa1OJb7_zdVS=Li9T_EjQdqH7Efuw () mail ! gmail ! com
[Download RAW message or body]
>
> SET lock_timeout TO '1s';
>
No, my assumption is that lock_timeout does not cover my use case here. My
point is actually that any one statement is not hitting lock_timeout, but
as a whole the transaction takes too long. For example if I set
lock_timeout to 1 second, but my migration actually has 10 SQL statements
each of which take just under a second, I have a total now of a near
10-second lockout.
Regardless of whether or not I am technically going idle, I want to be able
to abort based on transaction time length. I do believe I can handle this
externally via the timeout command, but curious still if there is any way
to reliably do it from within postgres.
Thanks,
Jeremy
[Attachment #3 (text/html)]
<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" \
style="margin:0px 0px 0px 0.8ex;border-left:1px solid \
rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div \
class="gmail_quote"><div>SET lock_timeout TO \
'1s';</div></div></div></div></blockquote><div><br></div><div>No, my \
assumption is that lock_timeout does not cover my use case here. My point is \
actually that any one statement is not hitting lock_timeout, but as a whole the \
transaction takes too long. For example if I set lock_timeout to 1 second, but my \
migration actually has 10 SQL statements each of which take just under a second, I \
have a total now of a near 10-second lockout.</div><div><br>Regardless of whether or \
not I am technically going idle, I want to be able to abort based on transaction time \
length. I do believe I can handle this externally via the timeout command, but \
curious still if there is any way to reliably do it from within \
postgres.</div><div><br></div><div>Thanks,</div><div>Jeremy </div></div></div>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic