Filesystem-layout for postgres?



  • 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



  • 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.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2