On Fri, Nov 15, 2013 at 10:40:20AM +0200, Heikki Linnakangas wrote:
> >The BTRFS_IOC_CLONE ioctl operates on file level and can be used to
> >clone files anywhere in a btrfs filesystem.
>
> Hmm, you can also do
>
> cp --reflog -r data92 data-tmp
I think you mean --reflink here.
> pg_upgrade --link --old-datadir=data92-copy --new-datadir=data-tmp
> rm -rf data-tmp
>
> That BTRFS_IOC_CLONE ioctl seems so hacky that I'd rather not get
> that in our source tree. cp --reflog is much more likely to get that
> magic incantation right, since it gets a lot more attention and
> testing than pg_upgrade.
>
> I'm not in favor of adding filesystem-specific tricks into
> pg_upgrade. It would be nice to list these tricks in the docs,
> though.
I have applied the attached patch which suggests the use of file system
snapshots and copy-on-write file copies.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +