Re: [PATCH] Relocation of tablespaces in pg_basebackup
От | Steeve Lennmark |
---|---|
Тема | Re: [PATCH] Relocation of tablespaces in pg_basebackup |
Дата | |
Msg-id | CADAK8w6WQtK85eurJ+qjUXi6Z3KHXUuePeSEL+tEMH7GxjcizA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [PATCH] Relocation of tablespaces in pg_basebackup (Gabriele Bartolini <gabriele.bartolini@2ndQuadrant.it>) |
Ответы |
Re: [PATCH] Relocation of tablespaces in pg_basebackup
|
Список | pgsql-hackers |
On Thu, Jan 9, 2014 at 10:29 PM, Gabriele Bartolini <gabriele.bartolini@2ndquadrant.it> wrote:
Hi Steeve,
> Il 09/01/14 22:10, Steeve Lennmark ha scritto:>I'd suggest, a similar solution to the one we have adopted in Barman (if
> 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
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.
I'm a barman user myself so that was actually my initial thought. If
there aren't some kind of hidden internal that I've missed I don't see
a way to convert an OID (only have OID and path at this stage) to a
tablespace name. This solution, even though not optimal, is a lot
better than my initial one where I used the OID directly.
> $ pg_basebackup -Xs -D backup/data -T /tmp/tblspc1:$(pwd)/backup/t1 -TWith the above example, it would become:
> /tmp/tblspc2:$(pwd)/backup/t2
$ pg_basebackup -Xs -D backup/data -T tblspc1:$(pwd)/backup/t1 -T
tblspc2:$(pwd)/backup/t2
Yeah, that would be my favourite solution.
Regards,
Steeve
--
Steeve Lennmark
В списке pgsql-hackers по дате отправления: