Re: Moving tablespaces - Mailing list pgsql-docs

From Tom Lane
Subject Re: Moving tablespaces
Date
Msg-id 23636.1323016890@sss.pgh.pa.us
Whole thread Raw
In response to Re: Moving tablespaces  (Magnus Hagander <magnus@hagander.net>)
Responses Re: Moving tablespaces
Re: [HACKERS] Moving tablespaces
List pgsql-docs
Magnus Hagander <magnus@hagander.net> 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 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 headaches, then +1.

> 2) Forcibly update the spclocation column when we start the server to
> be whatever the symlink points to. That will at least automatically
> restore the system to being consistent.

-1, running a transaction at that level will be a giant pita.
And how would you do it at all on a hot standby slave?

            regards, tom lane

pgsql-docs by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Moving tablespaces
Next
From: Magnus Hagander
Date:
Subject: Re: Moving tablespaces