Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext

Поиск
Список
Период
Сортировка
От Álvaro Herrera
Тема Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext
Дата
Msg-id 202509121703.y7nfmqwotmfv@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext  (Antonin Houska <ah@cybertec.at>)
Ответы Re: Unexpected changes of CurrentResourceOwner and CurrentMemoryContext
Список pgsql-hackers
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.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"Update: super-fast reaction on the Postgres bugs mailing list. The report
was acknowledged [...], and a fix is under discussion.
The wonders of open-source !"
             https://twitter.com/gunnarmorling/status/1596080409259003906



В списке pgsql-hackers по дате отправления: