Re: ReplicationSlotRelease() crashes when the instance is in the single user mode

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: "'pgsql-hackers(at)lists(dot)postgresql(dot)org'" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: ReplicationSlotRelease() crashes when the instance is in the single user mode
Date: 2025-02-18 07:50:22
Message-ID: Z7Q7vo-wWDwWw-tO@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 18, 2025 at 07:29:51AM +0000, Hayato Kuroda (Fujitsu) wrote:
> According to the original thread [1], there was a wide consensus replication-related
> operations can be rejected, except the slot removal. I feel this is reasonable.
>
> Currently pg_drop_replication_slot() requires the droping slot can be acquired,
> so we cannot reject it in single user mode as-is. Maybe we should revive the 0002
> patch in [1] then try to do that. Thought?
>
> [1]: https://www.postgresql.org/message-id/3b2f809f-326c-38dd-7a9e-897f957a4eb1%40enterprisedb.com

Ah, good point for the slot drop. So 0ce5cf2ef24f is claiming that
some of these manipulations are OK. I didn't suspect this one.

Slot advancing is a very different beast, unfortunately, that may
depend on many other subsystems. For example with logical slots we
would finish by calling rm_decode, which could be outside of core.
Justifying that this operation is supported in single-user mode is
larger than what you are suggesting here..
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2025-02-18 08:17:25 Re: Modify an incorrect regression test case in the group by key value elimination function
Previous Message songjinzhou 2025-02-18 07:40:35 Modify an incorrect regression test case in the group by key value elimination function