timescale / tobs

tobs - The Observability Stack for Kubernetes. Easy install of a full observability stack into a k8s cluster with Helm charts.
Apache License 2.0
560 stars 61 forks source link

Set stats_temp_directory to tmp directory #645

Closed alejandrodnm closed 1 year ago

alejandrodnm commented 1 year ago

What this PR does / why we need it

Moves the stats temporary file outside the data directory to improve disk performance.

According to the docs:

stats_temp_directory (string)

Sets the directory to store temporary statistics data in. This can be
a path relative to the data directory or an absolute path. The default
is pg_stat_tmp. Pointing this at a RAM-based file system will decrease
physical I/O requirements and can lead to improved performance. This
parameter can only be set in the postgresql.conf file or on the server
command line.

PG15 rewrote the statistics collector, from that version onward the statistics are no longer stored in files and the stats_temp_directory config options was deprecated. Once the DB upgrades to PG15 this setting can be removed.

Special notes for your reviewer

Checklist