public inbox for [email protected]  
help / color / mirror / Atom feed
From: PG Bug reporting form <[email protected]>
To: [email protected]
Cc: [email protected]
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: <[email protected]> (raw)

The following bug has been logged on the website:

Bug reference:      19488
Logged by:          Egor Chindyaskin
Email address:      [email protected]
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: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: BUG #19488: Standby connection fails after dropping on login event trigger enabled always
  In-Reply-To: <[email protected]>

* 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