Re: [PATCH] pg_upgrade: support for btrfs copy-on-write clones

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [PATCH] pg_upgrade: support for btrfs copy-on-write clones
Дата
Msg-id 20140213030731.GE4831@momjian.us
обсуждение исходный текст
Ответ на Re: [PATCH] pg_upgrade: support for btrfs copy-on-write clones  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-hackers
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. +

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Recovery inconsistencies, standby much larger than primary
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Prevent pg_basebackup -Fp -D -?