Álvaro Herrera <alvhe...@kurilemu.de> wrote: > On 2025-Sep-12, Antonin Houska wrote: > > > Euler Taveira <eu...@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