Re: Scanning pg_tablespace from walsender - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Scanning pg_tablespace from walsender
Date
Msg-id AANLkTimDR8Au6FtcZvGkaAYLn0BQCh=PTTL8GrXaCjUA@mail.gmail.com
Whole thread Raw
In response to Re: Scanning pg_tablespace from walsender  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Scanning pg_tablespace from walsender  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers
On Mon, Jan 3, 2011 at 10:37 AM, Magnus Hagander <magnus@hagander.net> wrote:
> On Mon, Jan 3, 2011 at 16:34, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Mon, Jan 3, 2011 at 10:25 AM, Magnus Hagander <magnus@hagander.net> wrote:
>>> I'm working on completing Heikki's patch for streaming base backups,
>>> and have run into a problem:
>>>
>>> In order to dump all tablespaces properly, I have to know where they
>>> are (d'uh).
>>
>> Can you get that directly from the filesystem layout?
>
> Hmm. I guess we could enumerate the pg_tblspc directory, and call
> readlink() on all the symlinks in there. Assuming all platforms can do
> readlink() (we'd obviously need a special windows implementation,  but
> that's doable I guess).
>
> I just figured it'd be a lot cleaner to read it from our own catalogs...

I don't even see why you'd need readlink.  Can't you just traverse the symlinks?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Scanning pg_tablespace from walsender
Next
From: Magnus Hagander
Date:
Subject: Re: Scanning pg_tablespace from walsender