Set all variable-length fields of pg_attribute to null on column drop - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Set all variable-length fields of pg_attribute to null on column drop
Date
Msg-id 249d819d-1763-4580-8110-0bf91a0f08b7@eisentraut.org
Whole thread Raw
Responses Re: Set all variable-length fields of pg_attribute to null on column drop
Re: Set all variable-length fields of pg_attribute to null on column drop
List pgsql-hackers
I noticed that when a column is dropped, RemoveAttributeById() clears 
out certain fields in pg_attribute, but it leaves the variable-length 
fields at the end (attacl, attoptions, and attfdwoptions) unchanged. 
This is probably harmless, but it seems wasteful and unclean, and leaves 
potentially dangling data lying around (for example, attacl could 
contain references to users that are later also dropped).

I suggest the attached patch to set those fields to null when a column 
is marked as dropped.
Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Report planning memory in EXPLAIN ANALYZE
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: Is this a problem in GenericXLogFinish()?