Filesystem-layout for postgres?

Posted on

Question :

Please advise with filesystem-layout to choose for PostgreSQL-Databases.

Assuming that wal is enabled. What filesystems should be built, which ones can be placed into the same FS?

I do not think it makes sense to make a file-system for every directory…

OS=RHEL 8, PG = 13

Answer :

I think that the best is to have three file systems:

  • one for the data directory

  • one for the log files (log_directory)

  • one for pg_wal

That reduced the risk of PostgreSQL crashing if either data files or log fill the disk. If you have them on different devices, it also helps to spread the I/O load.

Leave a Reply

Your email address will not be published. Required fields are marked *