On Sat, 2021-10-23 at 11:29 +0000, Laura Smith wrote: > Given an upcoming server upgrade, I'm contemplating moving away from XFS to ZFS > (specifically the ZoL flavour via Debian 11). > BTRFS seems to be falling away (e.g. with Redhat deprecating it etc.), hence my preference for ZFS. > > However, somewhere in the back of my mind I seem to have a recollection of reading > about what could be described as a "strong encouragement" to stick with more traditional options such as ext4 or xfs.
ZFS is probably reliable, so you can use it with PostgreSQL.
However, I have seen reports of performance tests that were not favorable for ZFS. So you should test if the performance is good enough for your use case.
It very much depends on lots of factors.
On the whole ZFS on spinning disks is going to have some performance... rough corners..... And it is a lot harder to reason about a lot of things including capacity and performance when you are doing copy on write on both the db and FS level, and have compression in the picture. And there are other areas of complexity, such as how you handle partial page writes.
On the whole I think for small dbs it might perform well enough. On large or high velocity dbs I think you will have more problems than expected.
Having worked with PostgreSQL on ZFS I wouldn't generally recommend it as a general tool.