pg_upgrade reflink support on OpenZFS - Mailing list pgsql-general

From Marcel Menzel
Subject pg_upgrade reflink support on OpenZFS
Date
Msg-id d81cc6e0-1279-414f-aedf-4cef5ece5272@menzel.de
Whole thread Raw
Responses Re: pg_upgrade reflink support on OpenZFS
List pgsql-general
Hello List,

For the PostgreSQL upgrade to version 18, I took the opportunity to test 
the reflink support in pg_upgrade (with --clone) on OpenZFS 2.3.4 / 
Linux 6.15.11 and it worked flawlessly, being a huge time saver here.

I've looked into the documentation for pg_upgrade and it's only 
mentioning btrfs and XFS on Linux and not FreeBSD at all, so I thought 
It'd be an interesting heads-up to report that Linux gained a 3rd FS and 
also I think FreeBSD in general the ability for doing reflink copies.

OpenZFS has been supporting this since 2.2 but has had it disabled due 
to data corruption bugs, now since 2.3 the sysctl (zfs_bclone_enabled on 
Linux, vfs.zfs.bclone_enabled on FreeBSD) has been enabled by default so 
only the zpool feature "block_cloning" has to be enabled, which might be 
the case when running "zpool upgrade".

I haven't had the possibility to check this on FreeBSD yet, but I don't 
see why this should not work as I also can't spot anything in the 
OpenZFS docs regarding reflink / block cloning limitations on FreeBSD.
Also I saw one of the OpenZFS devs writing on Reddit about block cloning 
being supported on FreeBSD v14.

Regards,
Marcel



pgsql-general by date:

Previous
From: Greg Sabino Mullane
Date:
Subject: Re: Pgbackrest info output interpretation
Next
From: Thomas Munro
Date:
Subject: Re: pg_upgrade reflink support on OpenZFS