agora inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Antonin Houska <ah@cybertec.at>
To: alvherre@kurilemu.de
Cc: Euler Taveira <euler@eulerto.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext
Date: Fri, 12 Sep 2025 20:03:36 +0200
Message-ID: <39892.1757700216@localhost> (raw)
In-Reply-To: <202509121703.y7nfmqwotmfv@alvherre.pgsql>
References: <202509121703.y7nfmqwotmfv@alvherre.pgsql>
Álvaro Herrera <alvherre@kurilemu.de> wrote:
> On 2025-Sep-12, Antonin Houska wrote:
>
> > Euler Taveira <euler@eulerto.com> wrote:
> >
> > > Interesting. I'm wondering that if this patch is applied we could remove the
> > > following code [...] from pg_logical_slot_get_changes_guts and
> > > LogicalSlotAdvanceAndCheckSnapState functions too. IIUC the referred
> > > code is a band-aid that will be improved someday.
> >
> > Even though we're fixing the likely reason of this problem, we cannot be 100%
> > sure that no other problem like this still exists. So I'd not remove this
> > assignment. Maybe add Assert(CurrentResourceOwner == old_resowner) in front of
> > that, and adjust the comment?
>
> Yeah, I'm going to risk removing it, because if we don't do it now,
> we're never going to do it. We can mitigate the risk of missing
> remaining bugs by having that assertion you suggest, so that if anyone
> actually hits a problem here, we'll know soon enough.
>
> I have pushed it with that change. I'll also add an open item for pg19
> so that we remember to come back to remove the assertions, if we feel we
> no longer need them.
I was worried about removing those workarounds because it was not trivial to
diagnose the issue. But it should be ok for the master branch. Thanks.
--
Antonin Houska
Web: https://www.cybertec-postgresql.com
view thread (10+ messages) latest in thread
Message-ID: <39892.1757700216@localhost>
Permalink: ../39892.1757700216@localhost/
Also on: postgresql.org/message-id/39892.1757700216@localhost
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-hackers@postgresql.org
Cc: ah@cybertec.at, alvherre@kurilemu.de, euler@eulerto.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext
In-Reply-To: <39892.1757700216@localhost>
* 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