pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Improve comment about dropped entries in pgstat.c 4+ messages / 1 participants [nested] [flat]
* pgsql: Improve comment about dropped entries in pgstat.c @ 2024-12-09 05:36 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 4+ messages in thread From: Michael Paquier @ 2024-12-09 05:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve comment about dropped entries in pgstat.c pgstat_write_statsfile() discards any entries marked as dropped from being written to the stats file at shutdown, and also included an assertion based on the same condition. The intention of the assertion is to track that no pgstats entries should be left around as terminating backends should drop any entries they still hold references on before the stats file is written by the checkpointer, and it not worth taking down the server in this case if there is a bug making that possible. Let's improve the comment of this area to document clearly what's intended. Based on a discussion with Bertrand Drouvot and Anton A. Melnikov. Author: Bertrand Drouvot Discussion: https://postgr.es/m/a13e8cdf-b97a-4ecb-8f42-aaa367974e29@postgrespro.ru Backpatch-through: 15 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a0ab20f16541cab2a2094433b3b812b1db2392f1 Modified Files -------------- src/backend/utils/activity/pgstat.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Improve comment about dropped entries in pgstat.c @ 2024-12-09 05:36 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 4+ messages in thread From: Michael Paquier @ 2024-12-09 05:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve comment about dropped entries in pgstat.c pgstat_write_statsfile() discards any entries marked as dropped from being written to the stats file at shutdown, and also included an assertion based on the same condition. The intention of the assertion is to track that no pgstats entries should be left around as terminating backends should drop any entries they still hold references on before the stats file is written by the checkpointer, and it not worth taking down the server in this case if there is a bug making that possible. Let's improve the comment of this area to document clearly what's intended. Based on a discussion with Bertrand Drouvot and Anton A. Melnikov. Author: Bertrand Drouvot Discussion: https://postgr.es/m/a13e8cdf-b97a-4ecb-8f42-aaa367974e29@postgrespro.ru Backpatch-through: 15 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/001a537b83ec6e2ab8fa8af44458b0502c94dd5e Modified Files -------------- src/backend/utils/activity/pgstat.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Improve comment about dropped entries in pgstat.c @ 2024-12-09 05:36 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 4+ messages in thread From: Michael Paquier @ 2024-12-09 05:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve comment about dropped entries in pgstat.c pgstat_write_statsfile() discards any entries marked as dropped from being written to the stats file at shutdown, and also included an assertion based on the same condition. The intention of the assertion is to track that no pgstats entries should be left around as terminating backends should drop any entries they still hold references on before the stats file is written by the checkpointer, and it not worth taking down the server in this case if there is a bug making that possible. Let's improve the comment of this area to document clearly what's intended. Based on a discussion with Bertrand Drouvot and Anton A. Melnikov. Author: Bertrand Drouvot Discussion: https://postgr.es/m/a13e8cdf-b97a-4ecb-8f42-aaa367974e29@postgrespro.ru Backpatch-through: 15 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bb93b33d7e39bb7a61ad6673193ab953fdc3f29c Modified Files -------------- src/backend/utils/activity/pgstat.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Improve comment about dropped entries in pgstat.c @ 2024-12-09 05:36 Michael Paquier <michael@paquier.xyz> 0 siblings, 0 replies; 4+ messages in thread From: Michael Paquier @ 2024-12-09 05:36 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Improve comment about dropped entries in pgstat.c pgstat_write_statsfile() discards any entries marked as dropped from being written to the stats file at shutdown, and also included an assertion based on the same condition. The intention of the assertion is to track that no pgstats entries should be left around as terminating backends should drop any entries they still hold references on before the stats file is written by the checkpointer, and it not worth taking down the server in this case if there is a bug making that possible. Let's improve the comment of this area to document clearly what's intended. Based on a discussion with Bertrand Drouvot and Anton A. Melnikov. Author: Bertrand Drouvot Discussion: https://postgr.es/m/a13e8cdf-b97a-4ecb-8f42-aaa367974e29@postgrespro.ru Backpatch-through: 15 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ec194b448cbc7f9fe2204cdb7690eb4c21a46d8e Modified Files -------------- src/backend/utils/activity/pgstat.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2024-12-09 05:36 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-12-09 05:36 pgsql: Improve comment about dropped entries in pgstat.c Michael Paquier <michael@paquier.xyz> 2024-12-09 05:36 pgsql: Improve comment about dropped entries in pgstat.c Michael Paquier <michael@paquier.xyz> 2024-12-09 05:36 pgsql: Improve comment about dropped entries in pgstat.c Michael Paquier <michael@paquier.xyz> 2024-12-09 05:36 pgsql: Improve comment about dropped entries in pgstat.c 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