Re: Xact end leaves CurrentMemoryContext = TopMemoryContext - Mailing list pgsql-hackers

From Anthonin Bonnefoy
Subject Re: Xact end leaves CurrentMemoryContext = TopMemoryContext
Date
Msg-id CAO6_XqrCwT0e5VdY8V2_GHPOB26_omURuWoPTNA1dxB=JLNnaQ@mail.gmail.com
Whole thread Raw
In response to Re: Xact end leaves CurrentMemoryContext = TopMemoryContext  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

This change seems to have introduced an issue where a deleted context
can be restored. This happens when a replication command exports a
snapshot since the transaction used is aborted at the start of the
next command. This leads to a memory context allocated with itself as
a parent and child, triggering an infinite loop when attempting to
delete it. I've written more details in a separate thread[1].

[1]: https://www.postgresql.org/message-id/flat/CAO6_XqoJA7-_G6t7Uqe5nWF3nj+QBGn4F6Ptp=rUGDr0zo+KvA@mail.gmail.com



pgsql-hackers by date:

Previous
From: Anthonin Bonnefoy
Date:
Subject: Re: Memory context can be its own parent and child in replication command
Next
From: John Naylor
Date:
Subject: Re: Improve CRC32C performance on SSE4.2