pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: David Rowley <drowley@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Remove "parent" column from pg_backend_memory_contexts
Date: Mon, 12 Aug 2024 03:42:37 +0000
Message-ID: <E1sdLx7-003nSI-4L@gemulon.postgresql.org> (raw)

Remove "parent" column from pg_backend_memory_contexts

32d3ed816 added the "path" column to pg_backend_memory_contexts to allow
a stable method of obtaining the parent MemoryContext of a given row in
the view.  Using the "path" column is now the preferred method of
obtaining the parent row.

Previously, any queries which were self-joining to this view using the
"name" and "parent" columns could get incorrect results due to the fact
that names are not unique.  Here we aim to explicitly break such queries
so that they can be corrected and use the "path" column instead.

It is possible that there are more innocent users of the parent column
that just need an indication of the parent and having to write out a
self-joining CTE may be an unnecessary hassle for those cases.  Let's
remove the column for now and see if anyone comes back with any
complaints.  This does seem like a good time to attempt to get rid of
the column as we still have around 1 year to revert this if someone comes
back with a valid complaint.  Plus this view is new to v14 and is quite
niche, so perhaps not many people will be affected.

Author: Melih Mutlu <m.melihmutlu@gmail.com>
Discussion: https://postgr.es/m/CAGPVpCT7NOe4fZXRL8XaoxHpSXYTu6GTpULT_3E-HT9hzjoFRA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f0d11275954719fd5d0281d4135e5c78de46e099

Modified Files
--------------
doc/src/sgml/system-views.sgml         |  9 -----
src/backend/utils/adt/mcxtfuncs.c      | 65 +++++++++++-----------------------
src/include/catalog/catversion.h       |  2 +-
src/include/catalog/pg_proc.dat        |  6 ++--
src/test/regress/expected/rules.out    |  3 +-
src/test/regress/expected/sysviews.out | 16 ++++-----
src/test/regress/sql/sysviews.sql      |  4 +--
7 files changed, 36 insertions(+), 69 deletions(-)



Message-ID: <E1sdLx7-003nSI-4L@gemulon.postgresql.org>
Permalink:  ../E1sdLx7-003nSI-4L@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sdLx7-003nSI-4L@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: drowley@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Remove "parent" column from pg_backend_memory_contexts
  In-Reply-To: <E1sdLx7-003nSI-4L@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