Re: Use get_call_result_type() more widely

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Use get_call_result_type() more widely
Дата
Msg-id 2334526.1670946171@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Use get_call_result_type() more widely  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Use get_call_result_type() more widely  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Re: Use get_call_result_type() more widely  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> writes:
> A review comment in another thread [1] by Michael Paquier about the
> usage of get_call_result_type() instead of explicit building of
> TupleDesc made me think about using it more widely. Actually, the
> get_call_result_type() looks at the function definitions to figure the
> column names and build the required TupleDesc, usage of which avoids
> duplication of the column names between pg_proc.dat/function
> definitions and source code. Also, it saves a good number of LOC ~415
> [2] and the size of all the object files put together gets reduced by
> ~4MB, which means, the postgres binary becomes leaner by ~4MB [3].

Saving code is nice, but I'd assume the result is slower, because
get_call_result_type has to do a pretty substantial amount of work
to get the data to construct the tupdesc from.  Have you tried to
quantify how much overhead this'd add?  Which of these functions
can we safely consider to be non-performance-critical?

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: Perform streaming logical transactions by background workers and parallel apply
Следующее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Add LSN along with offset to error messages reported for WAL file read/write/validate header failures