pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Set all variable-length fields of pg_attribute to null on column
Date: Fri, 22 Dec 2023 21:00:31 +0000
Message-ID: <E1rGmdC-00BRUq-IG@gemulon.postgresql.org> (raw)

Set all variable-length fields of pg_attribute to null on column drop

When a column is dropped, the fields attacl, attoptions, and
attfdwoptions were kept unchanged.  This is probably harmless, but it
seems wasteful, and leaves potentially dangling data lying around (for
example, attacl could contain references to users that are later also
dropped).

Change this to set those fields to null when a column is marked as
dropped.

Reviewed-by: Alvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://www.postgresql.org/message-id/flat/249d819d-1763-4580-8110-0bf91a0f08b7@eisentraut.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/3e2e0d5ad7fcb89d18a71cbfc885ef184e1b6f2e

Modified Files
--------------
src/backend/catalog/heap.c | 39 +++++++++++++++++++++------------------
1 file changed, 21 insertions(+), 18 deletions(-)



Message-ID: <E1rGmdC-00BRUq-IG@gemulon.postgresql.org>
Permalink:  ../E1rGmdC-00BRUq-IG@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rGmdC-00BRUq-IG@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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Set all variable-length fields of pg_attribute to null on column
  In-Reply-To: <E1rGmdC-00BRUq-IG@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