Move pgstat.tmp into a temporary directory under $PGDATA named pg_stat_tmp.
Magnus Hagander <magnus@hagander.net>
Move pgstat.tmp into a temporary directory under $PGDATA named pg_stat_tmp. This allows the use of a ramdrive (either through mount or symlink) for the temporary file that's written every half second, which should reduce I/O. On server shutdown/startup, the file is written to the old location in the global directory, to preserve data across restarts. Bump catversion since the $PGDATA directory layout changed.
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/monitoring.sgml | modified | +12 −1 |
| doc/src/sgml/storage.sgml | modified | +7 −1 |
| src/backend/postmaster/pgstat.c | modified | +38 −22 |
| src/bin/initdb/initdb.c | modified | +3 −2 |
| src/include/catalog/catversion.h | modified | +2 −2 |