Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry

Поиск
Список
Период
Сортировка
От Drouvot, Bertrand
Тема Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry
Дата
Msg-id 17a537e3-9497-4427-82e8-8e2b3ad8fd5f@gmail.com
обсуждение исходный текст
Ответ на Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry  (Michael Paquier <michael@paquier.xyz>)
Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
Hi,

On 10/27/23 8:07 AM, Michael Paquier wrote:
> 
> The part that I found disturbing is here:
> +       tabentry = (PgStat_TableStatus *) entry_ref->pending;
> +       tablestatus = palloc(sizeof(PgStat_TableStatus));
> +       *tablestatus = *tabentry;
> 
> This causes tablestatus->trans to point to the same location as
> tabentry->trans, but wouldn't it be better to set tablestatus->trans
> to NULL instead for the copy returned to the caller?

Oh I see, yeah I do agree to set tablestatus->trans to NULL to avoid
any undesired interference with tabentry->trans.

Done in V8 attached (pgindent has been run on pgstatfuncs.c and
pgstat_relation.c).

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
Вложения

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

Предыдущее
От: "Hayato Kuroda (Fujitsu)"
Дата:
Сообщение: RE: [PoC] pg_upgrade: allow to upgrade publisher node
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry