From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Fred Habash <fmhabash@gmail.com>
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Guideline To Resolve LWLock:SubtransControlLock
Date: Thu, 16 Aug 2018 15:36:32 -0300
Message-ID: <20180816183632.lo34je5dudbros4a@alvherre.pgsql> (raw)
In-Reply-To: <CADpeV5wA_Ekz9yNEMKbazwvm+jfhk02tQGjK=G+_4BcGF-2GOw@mail.gmail.com>
On 2018-Aug-16, Fred Habash wrote:
> One of our database API's is run concurrently by near 40 sessions. We see
> all of them waiting back and forth on this wait state.
What version are you running?
> Why is it called Subtrans Control Lock?
It controls access to the pg_subtrans structure, which is used to record
parent/child transaction relationships (as you say, savepoints and
EXCEPTIONs in plpgsql are the most common uses, but not the only ones).
Normally lookup of these is optimized away, but once you cross a
threshold it cannot any longer.
> What are the common user session scenarios causing this wait?
> - I have read some describe the use of SQL savepoints or PL/pgSQL
> exception handling.
> What are known resolution measures?
Are you in a position to recompile Postgres?
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: alvherre@2ndquadrant.com, fmhabash@gmail.com, pgsql-performance@lists.postgresql.org
Subject: Re: Guideline To Resolve LWLock:SubtransControlLock
In-Reply-To: <20180816183632.lo34je5dudbros4a@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox