Re: [PATCH] Relocation of tablespaces in pg_basebackup

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: [PATCH] Relocation of tablespaces in pg_basebackup
Дата
Msg-id CABUevEzKvfPDtySRHx1W3Su7WEhjbz3sqGGFKM9e0M-V0RbQLQ@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  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers

On Fri, Jan 10, 2014 at 12:25 PM, Gabriele Bartolini <gabriele.bartolini@2ndquadrant.it> wrote:
Hi Steeve,

Il 09/01/14 22:38, Steeve Lennmark ha scritto:
> I'm a barman user myself so that was actually my initial thought.

Ah! Very good!
> 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.

Try:

SELECT spcname, oid, pg_tablespace_location(oid) FROM pg_tablespace


That would require a second connection to the database. You cannot run that query from the walsender session. And that's exactly the issue that Steeve pointed out in his first email.

I think it's better to let pg_basebackup work at the lower level, and then leave it to  higher level tools to be able to do the mapping to names.

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

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Gabriele Bartolini
Дата:
Сообщение: Re: [PATCH] Relocation of tablespaces in pg_basebackup
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [PATCH] Relocation of tablespaces in pg_basebackup