UFS PostgreSQL + mksnap_ffs on multiple file systems

achix

Well-Known Member

Reaction score: 49
Messages: 292

Hello,
I was just experimenting with PostgreSQL backup relying solely on the integrity of the frozen/atomic snapshot of the UFS file system, and I managed to have a valid (recoverable) PostgreSQL data cluster in every single test I did.
The question is what would happen if a data spanned across multiple file systems, e.g. when each database resides in its own table space which is located in its own filesystems, while the xaction logging is located in its own dedicated file system.
Is it possible to have all UFS snapshots "frozen" in relation to each other? (like ZFS recursive)
 
Last edited by a moderator:

junovitch@

Daemon
Developer

Reaction score: 620
Messages: 1,773

I can't answer regarding UFS but my thoughts on the approach... I would think the UFS approach would be a bit limiting given how cheap snapshots are on ZFS and given the 20 active snapshot max covered in mksnap_ffs(8). Using the traditional pg_dump(1) via a script or via the included /usr/local/etc/periodic/daily/502.pgsql seems like it would be the safest way to maintain a consistent database if you are spanning multiple file systems.
 

kpa

Beastie's Twin

Reaction score: 1,814
Messages: 6,318

I doubt that's possible because the snapshots are linked only to the individual filesystems they were made from.
 
Top