[PATCH] The heap_getsysattr function deletes unused parameters

Поиск
Список
Период
Сортировка
Искать

[PATCH] The heap_getsysattr function deletes unused parameters

От:
lei yang <yanglei.ovo@gmail.com>
Дата:
Вложения:
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.

Re: [PATCH] The heap_getsysattr function deletes unused parameters

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
lei yang  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


Re: [PATCH] The heap_getsysattr function deletes unused parameters

От:
Michael Paquier <michael@paquier.xyz>
Дата:
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

Re: [PATCH] The heap_getsysattr function deletes unused parameters

От:
lei yang <yanglei.ovo@gmail.com>
Дата:
Tom Lane  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.


FAQ