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: Remove MemoryContextContains().
Date: Thu, 06 Oct 2022 17:35:38 +0000
Message-ID: <E1ogUmX-001Boq-Gi@gemulon.postgresql.org> (raw)

Remove MemoryContextContains().

MemoryContextContains is no longer reliable in the wake of c6e0fe1f2,
because there's no longer very much redundancy in chunk headers.
(It wasn't *completely* reliable even before that, as there was a
chance of a false positive if you passed it something that didn't
point to an mcxt chunk at all.  But it was generally good enough.)

Hence, remove it.  There is no remaining core code that requires it.
Extensions that have been using it might be able to substitute a
test like "GetMemoryChunkContext(ptr) == context", recognizing that
this explicitly requires that the pointer point to some chunk.

Tom Lane and David Rowley

Discussion: https://postgr.es/m/1913788.1664898906@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9543eff5e015b6f6f832da2d95d659629a2022f3

Modified Files
--------------
src/backend/utils/mmgr/mcxt.c | 58 ++-----------------------------------------
src/include/utils/memutils.h  |  1 -
2 files changed, 2 insertions(+), 57 deletions(-)



Message-ID: <E1ogUmX-001Boq-Gi@gemulon.postgresql.org>
Permalink:  ../E1ogUmX-001Boq-Gi@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ogUmX-001Boq-Gi@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Remove MemoryContextContains().
  In-Reply-To: <E1ogUmX-001Boq-Gi@gemulon.postgresql.org>
  References: <E1ogUmX-001Boq-Gi@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