Re: Prevent crash when calling pgstat functions with unregistered stats kind
От
Bertrand Drouvot
Тема
Re: Prevent crash when calling pgstat functions with unregistered stats kind
Дата
Msg-id
akXalpb3zjPX3ZEl@bdtpg
Ответ на
Список
Дерево обсуждения
Prevent crash when calling pgstat functions with unregistered stats kind Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Prevent crash when calling pgstat functions with unregistered stats kind Ewan Young <kdbase.hack@gmail.com>
Re: Prevent crash when calling pgstat functions with unregistered stats kind Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Prevent crash when calling pgstat functions with unregistered stats kind Michael Paquier <michael@paquier.xyz>
Re: Prevent crash when calling pgstat functions with unregistered stats kind Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Prevent crash when calling pgstat functions with unregistered stats kind Michael Paquier <michael@paquier.xyz>
Re: Prevent crash when calling pgstat functions with unregistered stats kind Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Prevent crash when calling pgstat functions with unregistered stats kind Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Prevent crash when calling pgstat functions with unregistered stats kind Michael Paquier <michael@paquier.xyz>
Re: Prevent crash when calling pgstat functions with unregistered stats kind Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Hi Ewan, On Wed, Jul 01, 2026 at 04:20:39PM +0800, Ewan Young wrote: > Thanks for the patch — nice catch, and the diagnosis looks right. Thanks for looking at it! > One small thing: in pgstat_snapshot_fixed(), the existing > Assert(pgstat_is_kind_valid(kind)); becomes redundant after the new NULL > check. A non-NULL kind_info already implies the kind is valid (that's the > only way pgstat_get_kind_info() returns non-NULL), so the assert can never > fire. Might as well drop it and keep just the fixed_amount one. Yeah good catch, done in the attached. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления
От: zengman
Дата: