pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: injection_points: Add proper locking when reporting fixed-variab 2+ messages / 1 participants [nested] [flat]
* pgsql: injection_points: Add proper locking when reporting fixed-variab @ 2025-09-30 00:03 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2025-09-30 00:03 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org injection_points: Add proper locking when reporting fixed-variable stats Contrary to its siblings for the archiver, the bgwriter and the checkpointer stats, pgstat_report_inj_fixed() can be called concurrently. This was causing an assertion failure, while messing up with the stats. This code is aimed at being a template for extension developers, so it is not a critical issue, but let's be correct. This module has also been useful for some benchmarking, at least for me, and that was how I have discovered this issue. Oversight in f68cd847fa40. Author: Michael Paquier <michael@paquier.xyz> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: wenhui qiu <qiuwenhuifx@gmail.com> Discussion: https://postgr.es/m/aNnXbAXHPFUWPIz2@paquier.xyz Backpatch-through: 18 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/3cc689f833b1c9c5b52f1fe07c0e0fd817e23c8b Modified Files -------------- src/test/modules/injection_points/injection_stats_fixed.c | 4 ++++ 1 file changed, 4 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: injection_points: Add proper locking when reporting fixed-variab @ 2025-09-30 00:03 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 2+ messages in thread From: Michael Paquier @ 2025-09-30 00:03 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org injection_points: Add proper locking when reporting fixed-variable stats Contrary to its siblings for the archiver, the bgwriter and the checkpointer stats, pgstat_report_inj_fixed() can be called concurrently. This was causing an assertion failure, while messing up with the stats. This code is aimed at being a template for extension developers, so it is not a critical issue, but let's be correct. This module has also been useful for some benchmarking, at least for me, and that was how I have discovered this issue. Oversight in f68cd847fa40. Author: Michael Paquier <michael@paquier.xyz> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: wenhui qiu <qiuwenhuifx@gmail.com> Discussion: https://postgr.es/m/aNnXbAXHPFUWPIz2@paquier.xyz Backpatch-through: 18 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/b5f898944d1226f8daeb0bda58098f645582c80f Modified Files -------------- src/test/modules/injection_points/injection_stats_fixed.c | 4 ++++ 1 file changed, 4 insertions(+) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-09-30 00:03 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2025-09-30 00:03 pgsql: injection_points: Add proper locking when reporting fixed-variab Michael Paquier <michael@paquier.xyz> 2025-09-30 00:03 pgsql: injection_points: Add proper locking when reporting fixed-variab Michael Paquier <michael@paquier.xyz>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox