Re: Pluggable cumulative statistics
От
Michael Paquier
Тема
Re: Pluggable cumulative statistics
Дата
Msg-id
ZpiuhF0g6Xop2TKA@paquier.xyz
Ответ на
Re: Pluggable cumulative statistics (Michael Paquier)
Список
Дерево обсуждения
Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Dmitry Dolgov <9erthalion6@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Andres Freund <andres@anarazel.de>
Re: Pluggable cumulative statistics Andres Freund <andres@anarazel.de>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Andrei Lepikhov <lepihov@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Andres Freund <andres@anarazel.de>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Pluggable cumulative statistics Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Pluggable cumulative statistics Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Dmitry Dolgov <9erthalion6@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Dmitry Dolgov <9erthalion6@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Dmitry Dolgov <9erthalion6@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
Re: Pluggable cumulative statistics Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Pluggable cumulative statistics Michael Paquier <michael@paquier.xyz>
On Tue, Jul 16, 2024 at 10:27:25AM +0900, Michael Paquier wrote: > Perhaps we should have a few more inline functions like > pgstat_get_entry_len() to retrieve the parts of the custom data in the > snapshot and shmem control structures for fixed-numbered stats. That > would limit what extensions need to know about > pgStatLocal.shmem->custom_data[] and > pgStatLocal.snapshot.custom_data[], which is easy to use incorrectly. > They don't need to know about pgStatLocal at all, either. > > Thinking over the weekend on this patch, splitting injection_stats.c > into two separate files to act as two templates for the variable and > fixed-numbered cases would be more friendly to developers, as well. I've been toying a bit with these two ideas, and the result is actually neater: - The example for fixed-numbered stats is now in its own new file, called injection_stats_fixed.c. - Stats in the dshash are at the same location, injection_stats.c. - pgstat_internal.h gains two inline routines called pgstat_get_custom_shmem_data and pgstat_get_custom_snapshot_data that hide completely the snapshot structure for extensions when it comes to custom fixed-numbered stats, see the new injection_stats_fixed.c that uses them. -- Michael
В списке pgsql-hackers по дате отправления
От: shveta malik
Дата: