Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Set stats_temp_directory to tmp directory #645

Merged
merged 1 commit into from
Nov 14, 2022
Merged

Conversation

alejandrodnm
Copy link
Contributor

@alejandrodnm alejandrodnm commented Nov 14, 2022

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

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.
@alejandrodnm alejandrodnm requested a review from a team as a code owner November 14, 2022 14:57
Copy link
Contributor

@onprem onprem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@onprem onprem enabled auto-merge November 14, 2022 15:01
@onprem onprem merged commit 62a86e3 into main Nov 14, 2022
@onprem onprem deleted the alejandrodnm-patch-1 branch November 14, 2022 15:08
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants