Re: [HACKERS] [DOCS] Moving tablespaces

2011-12-04 Thread Tom Lane
Andrew Dunstan writes: > On 12/04/2011 11:41 AM, Tom Lane wrote: >> Hm, how portable is symlink-reading? If we can actually do that >> without big headaches, then +1. > I wondered that, specifically about Windows junction points, but we seem > to have support for it already in dirmod.c::pgreadl

Re: [HACKERS] [DOCS] Moving tablespaces

2011-12-04 Thread Andrew Dunstan
On 12/04/2011 11:41 AM, Tom Lane wrote: 1) Remove the column. Rely on the symlink. Create a pg_get_tablespace_location(oid) function, that could be used by pg_dumpall and friends, that just reads the symlink. Hm, how portable is symlink-reading? If we can actually do that without big headac

Re: [DOCS] Moving tablespaces

2011-12-04 Thread Magnus Hagander
On Sun, Dec 4, 2011 at 17:41, Tom Lane wrote: > Magnus Hagander writes: >> And IIRC, we don't actually *use* spclocation anywhere. > > Just for pg_dump, I think. pg_dumpall :-) It's also used in pg_upgrade and pg_basebackup, but those are easily dealt with if we define a function for it. >> H

Re: [DOCS] Moving tablespaces

2011-12-04 Thread Tom Lane
Magnus Hagander writes: > And IIRC, we don't actually *use* spclocation anywhere. Just for pg_dump, I think. > How about we > just get rid of them as independents? We could either: > 1) Remove the column. Rely on the symlink. Create a > pg_get_tablespace_location(oid) function, that could be us

Re: [DOCS] Moving tablespaces

2011-12-04 Thread Magnus Hagander
On Sun, Dec 4, 2011 at 17:12, Bruce Momjian wrote: > Magnus Hagander wrote: >> On Sun, Dec 4, 2011 at 00:43, Bruce Momjian wrote: >> > Do we have any documentation about how to move a tablespace to a new >> > directory? ?If not, I think we should write some. >> >> Do we have any support for doing

Re: [DOCS] Moving tablespaces

2011-12-04 Thread Bruce Momjian
Magnus Hagander wrote: > On Sun, Dec 4, 2011 at 00:43, Bruce Momjian wrote: > > Do we have any documentation about how to move a tablespace to a new > > directory? ?If not, I think we should write some. > > Do we have any support for doing it? (Yes, it works, but anything that > requires manual h

Re: [DOCS] Moving tablespaces

2011-12-04 Thread Magnus Hagander
On Sun, Dec 4, 2011 at 00:43, Bruce Momjian wrote: > Do we have any documentation about how to move a tablespace to a new > directory?  If not, I think we should write some. Do we have any support for doing it? (Yes, it works, but anything that requires manual hacking of system catalogs really ca