pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: MemoryContextCreate: assert parent is valid and different from n
Date: Mon, 21 Apr 2025 15:34:49 +0000
Message-ID: <E1u6tAX-0017pz-1E@gemulon.postgresql.org> (raw)

MemoryContextCreate: assert parent is valid and different from node.

The case of "node == parent" might seem impossible, since we just
allocated the new node.  But it's possible if parent is a dangling
reference to a recently-deleted context.  In fact, given aset.c's
habit of recycling contexts, it's actually rather likely if that's so.
If we'd had this assertion before, it would have simplified debugging
a recently-identified walsender issue.

Reported-by: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/CAO6_XqoJA7-_G6t7Uqe5nWF3nj+QBGn4F6Ptp=rUGDr0zo+KvA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5ec8b01c30e7ea34bb42592ad9d34d4b02ea593d

Modified Files
--------------
src/backend/utils/mmgr/mcxt.c | 4 ++++
1 file changed, 4 insertions(+)



Message-ID: <E1u6tAX-0017pz-1E@gemulon.postgresql.org>
Permalink:  ../E1u6tAX-0017pz-1E@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1u6tAX-0017pz-1E@gemulon.postgresql.org

 · 

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-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: MemoryContextCreate: assert parent is valid and different from n
  In-Reply-To: <E1u6tAX-0017pz-1E@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox