Re: BUG #17186: In connect.c, the lock connections_mutex is not correctly released(Line 463) at the return(Line 522)

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: ryancaicse@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2021-09-13T04:37:21Z
Lists: pgsql-bugs
On Sat, Sep 11, 2021 at 02:38:47PM +0900, Michael Paquier wrote:
> If a client is under memory pressure, that could really mess up
> applications and the list of connections, so this had better be
> backpatched.

Done as of 3768c46, down to 9.6.  Thanks for the report, Ryan.
--
Michael

Commits

  1. Fix error handling with threads on OOM in ECPG connection logic

  2. Detect POLLHUP/POLLRDHUP while running queries.