Re: idle_in_transaction_session_timeout for a set of SQL statements - Mailing list pgsql-general

From Michael Lewis
Subject Re: idle_in_transaction_session_timeout for a set of SQL statements
Date
Msg-id CAHOFxGoTc0V4CdqSJdb3+pVUeS=nETZrpzFi02SDV4rFHNvOUw@mail.gmail.com
Whole thread Raw
In response to idle_in_transaction_session_timeout for a set of SQL statements  (Jeremy Finzel <finzelj@gmail.com>)
Responses Re: idle_in_transaction_session_timeout for a set of SQL statements  (Jeremy Finzel <finzelj@gmail.com>)
List pgsql-general
On Wed, Feb 27, 2019 at 7:56 AM Jeremy Finzel <finzelj@gmail.com> wrote:
I was hoping to use idle_in_transaction_session_timeout to prevent schema change migrations from running too long and thereby locking up the application for an extended period even if any one statement in the migration is very short.

 
I don't think you are actually going idle. Check pg_stat_activity for what this transaction is doing. It should show waiting on locks, but not idle. I think the command you seek is

SET lock_timeout TO '1s';


pgsql-general by date:

Previous
From: Filip Rembiałkowski
Date:
Subject: Re: 9.0 standby - could not open file global/XXXXX
Next
From: "Peter J. Holzer"
Date:
Subject: Re: why not using a mountpoint as PGDATA?