Re: Btrfs clone WIP patch

From: Greg Smith <greg(at)2ndQuadrant(dot)com>
To: Jonathan Rogers <jrogers(at)socialserve(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Btrfs clone WIP patch
Date: 2013-03-11 08:12:02
Message-ID: 513D91D2.3080900@2ndQuadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 3/9/13 11:39 PM, Jonathan Rogers wrote:
> In an earlier implementation, I did call "cp --reflink=auto" once per
> regular file, preserving the behavior of copydir. On Btrfs, this works
> well, though slightly slower due to extra processes. AFAIK, there's no
> way to do something equivalent on ZFS without coming up with a much more
> complicated scheme involving both links and clones.

Chasing after the performance win of the copy acceleration seems worth
it. We can't really do that if it results in an obvious behavior change
though. If it takes a bit longer to do it file at a time, but that's
the right thing to do, as long as it's still a net win this idea is
still worthwhile.

> I don't think it will be possible to implement a scheme that works on
> ZFS and addresses your concerns about file and directory handling that
> is not many times more complex than what I have so far. OTOH, I think
> the approach I have already implemented which calls an external command
> for each regular file to copy might be acceptable. Since I don't
> personally have much interest in using ZFS, I think I'm going to just
> focus on Btrfs for now.

Just be aware that OS specific features like this are a lot more likely
to be accepted if they're demonstrated to work on two OSes. That's much
better evidence that the API for the OS specific work is a good one.

--
Greg Smith 2ndQuadrant US greg(at)2ndQuadrant(dot)com Baltimore, MD
PostgreSQL Training, Services, and 24x7 Support www.2ndQuadrant.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Koterov 2013-03-11 13:20:44 Re: Reproducible "Bus error" in 9.2.3 during database dump restoration (Ubuntu Server 12.04 LTS)
Previous Message Greg Smith 2013-03-11 07:39:58 Re: Re: Proposal for Allow postgresql.conf values to be changed via SQL [review]