From: | Gabriele Bartolini <gabriele(dot)bartolini(at)2ndQuadrant(dot)it> |
---|---|
To: | Steeve Lennmark <steevel(at)handeldsbanken(dot)se>, Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Relocation of tablespaces in pg_basebackup |
Date: | 2014-01-09 21:29:53 |
Message-ID: | 52CF14D1.2060403@2ndQuadrant.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi Steeve,
> Il 09/01/14 22:10, Steeve Lennmark ha scritto:
>
> That's a much better solution, I attached a patch with the updated code.
>
> # SELECT oid, pg_tablespace_location(oid) FROM pg_tablespace;
> [...]
> 16388 | /tmp/tblspc1
> 16389 | /tmp/tblspc2
I'd suggest, a similar solution to the one we have adopted in Barman (if
you don't know it: www.pgbarman.org), that is:
--tablespace NAME:LOCATION [--tablespace NAME:location]
I prefer this over the location on the master as this might change over
time (at least more frequently than the tablespace name) and over servers.
> $ pg_basebackup -Xs -D backup/data -T /tmp/tblspc1:$(pwd)/backup/t1 -T
> /tmp/tblspc2:$(pwd)/backup/t2
With the above example, it would become:
$ pg_basebackup -Xs -D backup/data -T tblspc1:$(pwd)/backup/t1 -T
tblspc2:$(pwd)/backup/t2
Thanks,
Gabriele
--
Gabriele Bartolini - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gabriele(dot)bartolini(at)2ndQuadrant(dot)it | www.2ndQuadrant.it
From | Date | Subject | |
---|---|---|---|
Next Message | Jim Nasby | 2014-01-09 21:33:36 | Re: Standalone synchronous master |
Previous Message | Robert Haas | 2014-01-09 21:27:23 | Re: Turning off HOT/Cleanup sometimes |