aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2024-07-17 11:50:36 +0900
committerMichael Paquier <michael@paquier.xyz>2024-07-17 11:50:36 +0900
commitec678692f6d0a8b05b86ca08e96b51e4063cba32 (patch)
tree7f17b2cf7a81606d9c6c306dccf37db20c0730c8 /src/backend/tcop/postgres.c
parent4b74ebf726d444ba820830cad986a1f92f724649 (diff)
downloadpostgresql-ec678692f6d0a8b05b86ca08e96b51e4063cba32.tar.gz
postgresql-ec678692f6d0a8b05b86ca08e96b51e4063cba32.zip
Make write of pgstats file durable at shutdown
This switches the pgstats write code to use durable_rename() rather than rename(). This ensures that the stats file's data is durable when the statistics are written, which is something only happening at shutdown now with the checkpointer doing the job. This could cause the statistics to be lost even after PostgreSQL is shut down, should a host failure happen, for example. Suggested-by: Konstantin Knizhnik Reviewed-by: Bertrand Drouvot Discussion: https://postgr.es/m/ZpDQTZ0cAz0WEbh7@paquier.xyz
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions