[PATCH] The heap_getsysattr function deletes unused parameters
Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.
You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:
docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t253086psql -h localhost -U postgresBuilt from patchset v1 (message #1), September 20, 2026 at 06:26 AM.
Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:
git clone --branch t253086_1 https://github.com/hackorum-dev/postgres.gitIn a checkout you already have, add the fork once:
git remote add hackorum https://github.com/hackorum-dev/postgres.gitthen, for this patchset and every later one:
git fetch hackorum t253086_1 && git checkout t253086_1Patchset v1 (message #1) is on t253086_1
hi,
The tupleDesc parameter in the heap_getsysattr function is not used,
and the TupleDesc structure does not contain system attributes.
Maybe we can delete the parameter tupleDesc.
lei yang <yanglei.ovo@gmail.com> writes:
The tupleDesc parameter in the heap_getsysattr function is not used,
and the TupleDesc structure does not contain system attributes.
Maybe we can delete the parameter tupleDesc.
I do not think this is a great idea. We don't use the tupdesc today
perhaps, but it's plausible that it'd be needed in the future.
Different table AMs might have different sets of system columns.
Unless you can show a measurable performance gain from this change,
we should leave it alone.
regards, tom lane
On Wed, Jul 15, 2026 at 11:53:40AM -0400, Tom Lane wrote:
I do not think this is a great idea. We don't use the tupdesc today
perhaps, but it's plausible that it'd be needed in the future.
Different table AMs might have different sets of system columns.Unless you can show a measurable performance gain from this change,
we should leave it alone.
One thing that may make this removal worth it would be to look at if
heap_getsysattr() is used in some extension outside of the core code
and see if these removals lead to some simplifications with the
TupleDescs involved (say for example less locks required). The
in-core callers of heap_getsysattr() don't make that perspective
really attractive.
--
Michael
Tom Lane <tgl@sss.pgh.pa.us> writes:
I do not think this is a great idea. We don't use the tupdesc today
perhaps, but it's plausible that it'd be needed in the future.
Different table AMs might have different sets of system columns.
Thank you for your guidance.I didn't consider that different table AMs
might store system column information in tupdesc before.