[pgpool-general: 2488] Re: Advisory Locks and session termination

Tatsuo Ishii ishii at postgresql.org
Sat Jan 25 10:39:38 JST 2014

> Greetings!
> We are using Postgres advisory locks in our application which is using
> PGPool's connection pool.
> Normally, Postgres will unlock any locks that a database session created
> upon session termination.  However, since PGPool is keeping the sessions to
> Postgres open for many calls, I wonder how this works.
> It looks like this setting:
> reset_query_list = 'ABORT; DISCARD ALL'
> will cause those SQL commands to be sent to Postgres, which effectively
> will clear the session including any advisory locks.
> That seems to be working, but I'm wondering if it works for all of the ways
> that the application could disconnect from pgpool.  We really don't want
> any advisory locks to survive an application session, ever.

It should work as you expect. Also I recommend to set followings to
appropriate value. These will prevent connections to PostgreSQL
unexpectedly remain and effectively release the advisory locks.


Best regards,
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese: http://www.sraoss.co.jp

More information about the pgpool-general mailing list