From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Streaming base backups |
Date: | 2011-01-08 16:34:01 |
Message-ID: | AANLkTin6yuEE9ZnykjrdYTC4S_rRDBsoE8BK0bPBcKRP@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jan 6, 2011 at 23:57, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)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 | Content-Type | Size |
---|---|---|
basebackup.patch | text/x-patch | 24.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Joel Jacobson | 2011-01-08 17:41:11 | Re: obj_unique_identifier(oid) |
Previous Message | Tatsuo Ishii | 2011-01-08 14:52:41 | Error code for "terminating connection due to conflict with recovery" |