Skip site navigation (1) Skip section navigation (2)

Re: Scanning pg_tablespace from walsender

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Scanning pg_tablespace from walsender
Date: 2011-01-03 15:42:35
Message-ID: AANLkTik3M67OX5XYhsfvgtHbyyhdH45X1ievuZDUU5B3@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On Mon, Jan 3, 2011 at 16:40, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Mon, Jan 3, 2011 at 10:37 AM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>> On Mon, Jan 3, 2011 at 16:34, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>> On Mon, Jan 3, 2011 at 10:25 AM, Magnus Hagander <magnus(at)hagander(dot)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?

Well, they need to be put back in the same location on the other
machine (slave in case of replication, tarball otherwise). If I just
traverse the symlinks, they'll just appears as a subdirectory of
pg_tblspc on the other machine, won't they?

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

In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2011-01-03 15:43:54
Subject: Re: Scanning pg_tablespace from walsender
Previous:From: Robert HaasDate: 2011-01-03 15:40:10
Subject: Re: Scanning pg_tablespace from walsender

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group