Re: TODO item: teach pg_dump about sparsely-stored large objects

From: Greg Stark <stark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: TODO item: teach pg_dump about sparsely-stored large objects
Date: 2012-10-09 15:44:44
Message-ID: CAM-w4HOvd-OKJ=hy72YsRV72SusSMX4rYpbAvt+RvfkJDYtQDw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 9, 2012 at 3:40 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Admittedly, this is no different than what happens when you try to back
> up a sparsely-stored Unix file, at least with simpler backup tools.
> But it seems to me we should try a bit harder.

Fwiw both GNU tar and GNU cp support creating sparse files. They do it
by just detecting blocks of NULs and skipping over them. pg_restore
could do that today without any API changes.

That said, an API to save pg_dump the time and space of reading the
fake zeros out of the database dosen't sonud like a bad thing.

--
greg

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sébastien Lardière 2012-10-09 16:28:08 Re: Truncate if exists
Previous Message Greg Stark 2012-10-09 15:39:24 Re: Add FET to Default and Europe.txt