public inbox for pgsql-bugs@postgresql.org
help / color / mirror / Atom feedFrom: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: kyzevan23@mail.ru
Subject: BUG #19488: Standby connection fails after dropping on login event trigger enabled always
Date: Tue, 19 May 2026 11:06:06 +0000
Message-ID: <19488-d7ccfca2bf6b74b0@postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 19488
Logged by: Egor Chindyaskin
Email address: kyzevan23@mail.ru
PostgreSQL version: 18.4
Operating system: Ubuntu 26.04
Description:
Hello!
In a master + physical standby setup, connection to the standby fails after
creating a login event trigger on the master, enabling it as always, and
then dropping it without reconnecting to the master.
Also reproduces on master branch.
Steps to reproduce:
1. Run the following SQL script on the master:
CREATE OR REPLACE FUNCTION init_session()
RETURNS event_trigger SECURITY DEFINER
LANGUAGE plpgsql AS
$$
BEGIN
RAISE NOTICE 'init_session';
END;
$$;
CREATE EVENT TRIGGER init_session
ON login
EXECUTE FUNCTION init_session();
ALTER EVENT TRIGGER init_session ENABLE ALWAYS;
DROP EVENT TRIGGER init_session;
2. Try to connect to the standby:
psql -p5433
Result:
psql: error: connection to server on socket "/tmp/.s.PGSQL.5433" failed:
FATAL: cannot acquire lock mode AccessExclusiveLock on database objects
while recovery is in progress
HINT: Only RowExclusiveLock or less can be acquired on database objects
during recovery.
--
With best regards,
Egor Chindyaskin
Postgres Professional: https://postgrespro.com
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, kyzevan23@mail.ru
Subject: Re: BUG #19488: Standby connection fails after dropping on login event trigger enabled always
In-Reply-To: <19488-d7ccfca2bf6b74b0@postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox