From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | Gabriele Bartolini <gabriele(dot)bartolini(at)2ndquadrant(dot)it>, Steeve Lennmark <steevel(at)handeldsbanken(dot)se>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Relocation of tablespaces in pg_basebackup |
Date: | 2014-01-10 11:29:42 |
Message-ID: | 20140110112942.GA9762@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2014-01-10 12:27:23 +0100, Magnus Hagander wrote:
> On Fri, Jan 10, 2014 at 12:25 PM, Gabriele Bartolini <
> gabriele(dot)bartolini(at)2ndquadrant(dot)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.
Theoretically nothing is stopping us from providing a command outputting
that information - it's a global catalog, so we can access it without
problems.
> 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.
That doesn't negate this argument though. Not really convinced either
way yet.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Florian Pflug | 2014-01-10 12:00:05 | Re: array_length(anyarray) |
Previous Message | Magnus Hagander | 2014-01-10 11:27:23 | Re: [PATCH] Relocation of tablespaces in pg_basebackup |