Re: [HACKERS] [PATCH] A hook for session start

Andrew Dunstan <andrew.dunstan@2ndquadrant.com>

From: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
To: fabriziomello@gmail.com, Michael Paquier <michael.paquier@gmail.com>
Cc: Aleksandr Parfenov <a.parfenov@postgrespro.ru>, Pgsql Hackers <pgsql-hackers@postgresql.org>, Yugo Nagata <nagata@sraoss.co.jp>, Tom Lane <tgl@sss.pgh.pa.us>, Ashutosh Sharma <ashu.coek88@gmail.com>
Date: 2017-11-19T21:38:47Z
Lists: pgsql-hackers

On 11/16/2017 10:38 PM, Fabrízio de Royes Mello wrote:
> Hi all,
>
> Attached new version of the patch fixing issues about installcheck and
> some assertions reported before (based on Michael Paquier code):
>
> https://www.postgresql.org/message-id/flat/30479.1510800078%40sss.pgh.pa.us#30479.1510800078@sss.pgh.pa.us
> https://www.postgresql.org/message-id/flat/20171116121823.GI4628%40tamriel.snowman.net#20171116121823.GI4628@tamriel.snowman.net
>
> Regards,



I think this:

    #define IsClientBackend() \
        (MyBackendId != InvalidBackendId &&    \
         !IsAutoVacuumLauncherProcess() &&    \
         !IsAutoVacuumWorkerProcess() && \
         !am_walsender && \
         !IsBackgroundWorker)


probably belongs somewhere more central. Surely this isn't the only
place that we want to be able to run such a test?

cheers

andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add hooks for session start and session end, take two