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 <[email protected]> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ Everyone has their own god. +
diff --git a/doc/src/sgml/pgupgrade.sgml b/doc/src/sgml/pgupgrade.sgml
new file mode 100644
index 3d529b2..bb3b6a0
*** a/doc/src/sgml/pgupgrade.sgml
--- b/doc/src/sgml/pgupgrade.sgml
*************** psql --username postgres --file script.s
*** 569,575 ****
the old server and run <command>rsync</> again to update the copy with any
changes to make it consistent. You might want to exclude some
files, e.g. <filename>postmaster.pid</>, as documented in <xref
! linkend="backup-lowlevel-base-backup">.
</para>
<refsect2>
--- 569,578 ----
the old server and run <command>rsync</> again to update the copy with any
changes to make it consistent. You might want to exclude some
files, e.g. <filename>postmaster.pid</>, as documented in <xref
! linkend="backup-lowlevel-base-backup">. If your file system supports
! file system snapshots or copy-on-write file copying, you can use that
! to make a backup of the old cluster, though the snapshot and copies
! must be created simultaneously or while the database server is down.
</para>
<refsect2>
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers