Re: On login trigger: take three - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: On login trigger: take three
Date
Msg-id 71349E03-BCF3-4C38-B60B-481EFCEB38EE@yesql.se
Whole thread Raw
In response to Re: On login trigger: take three  (Alexander Lakhin <exclusion@gmail.com>)
List pgsql-hackers
> On 13 Jan 2024, at 17:00, Alexander Lakhin <exclusion@gmail.com> wrote:

> DROP EVENT TRIGGER olt;
> SELECT dathasloginevt FROM pg_database WHERE datname= current_database();
>  dathasloginevt
> ----------------
>  t
> (1 row)
>
> Although after reconnection (\c, as done in the event_trigger_login test),
> this query returns 'f'.

This is by design in the patch.  The flag isn't changed on DROP, it is only
cleared on logins iff there is no login event trigger.  The description in the
docs is worded to indicate that it shouldn't be taken as truth for monitoring
purposes:

    "This flag is used internally by PostgreSQL and should not be manually
    altered or read for monitoring purposes."

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Jelte Fennema-Nio
Date:
Subject: Re: Add PQsendSyncMessage() to libpq
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Documentation to upgrade logical replication cluster