Re: Hooks for session start and end, take two

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Fabrízio de Royes Mello <fabriziomello@gmail.com>
Cc: legrand legrand <legrand_legrand@hotmail.com>, Pgsql Hackers <pgsql-hackers@postgresql.org>
Date: 2019-10-01T03:17:22Z
Lists: pgsql-hackers
On Mon, Sep 30, 2019 at 02:46:42PM -0300, Fabrízio de Royes Mello wrote:
> Makes sense to me. I become a reviewer and run all tests (make check &&
> make check-world) and everything is ok. Changed status to "ready for
> commiter".

Thanks.  There was an extra problem in the module hidden in the logs
of the regression tests: the autovacuum launcher has a backend ID
assigned at the moment of the session end hook (not the start), but it
is connected to no databases so I added a check on that in the start
and end hooks of the module.  That's more logic this way anyway as we
run a transaction in the test, and much better than using directly
GetUserIdAndSecContext() which would not assert for an invalid user
ID.  And done with e788bd9.
--
Michael

Commits

  1. Add hooks for session start and session end, take two