Re: Use CompactAttribute more often, when possible - Mailing list pgsql-hackers

From David Rowley
Subject Re: Use CompactAttribute more often, when possible
Date
Msg-id CAApHDvonyWtyKWT7D1HfD9oAdyWe_LBuNVeuLa4fqrJ2xz3w2Q@mail.gmail.com
Whole thread Raw
In response to Re: Use CompactAttribute more often, when possible  (Chao Li <li.evan.chao@gmail.com>)
Responses Re: Use CompactAttribute more often, when possible
List pgsql-hackers
On Mon, 20 Oct 2025 at 21:34, Chao Li <li.evan.chao@gmail.com> wrote:
> I search for “TupleDescAttr”, and found more occurrences to replace. See the attached diff file.

Thanks for looking.  There was a bunch that I didn't do and tried to
convey that in the commit message.

The diff you sent seems to contain a mix of my ones and your
additional ones. If you can sort that out so it's just yours and
subtract the following, which I've already decided not to do.

* MergeConstraintsIntoExisting -- I don't want to touch these for ALTER TABLE.
* record_recv -- Not done. First loop could be done but 2nd loop needs
atttypid, so Form_pg_attribute needs accessed regardless
* record_send -- Not done. First loop could be done but 2nd loop needs
atttypid, so Form_pg_attribute needs accessed regardless
* ATExecAddColumn -- I don't want to touch these for ALTER TABLE.
* CatalogTupleCheckConstraints -- Not done. This is just for Asserts
* ATRewriteTable -- I don't want to touch these for ALTER TABLE.
* ATAddForeignKeyConstraint -- I don't want to touch these for ALTER TABLE.
* set_attnotnull -- I don't want to touch these for ALTER TABLE.
* FreeTupleDesc -- Not done. I'd rather not use CompactAttribute here
just in case someone forgets to flush changes before freeing the
TupleDesc
* get_sql_insert -- Not done.  There are two loops, only 1 can use
CompactAttribute.

Thanks

David



pgsql-hackers by date:

Previous
From: Xuneng Zhou
Date:
Subject: Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array
Next
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: How can end users know the cause of LR slot sync delays?