Re: Streaming base backups - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Streaming base backups
Date
Msg-id AANLkTin6yuEE9ZnykjrdYTC4S_rRDBsoE8BK0bPBcKRP@mail.gmail.com
Whole thread Raw
In response to Re: Streaming base backups  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Thu, Jan 6, 2011 at 23:57, Heikki Linnakangas
<heikki.linnakangas@enterprisedb.com> wrote:
>
> Looks like pg_streamrecv creates the pg_xlog and pg_tblspc directories,
> because they're not included in the streamed tar. Wouldn't it be better to
> include them in the tar as empty directories at the server-side? Otherwise
> if you write the tar file to disk and untar it later, you have to manually
> create them.

Attached is an updated patch that does this.

It also collects all the header records as a single resultset at the
beginning. This made for cleaner code, but more importantly makes it
possible to get the total size of the backup even if there are
multiple tablespaces.

It also changes the tar members to use relative paths instead of
absolute ones - since we send the root of the directory in the header
anyway. That also takes away the "./" portion in all tar members.

git branch on github updated as well, of course.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Attachment

pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Error code for "terminating connection due to conflict with recovery"
Next
From: Joel Jacobson
Date:
Subject: Re: obj_unique_identifier(oid)