Re: Moving tablespaces

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-documentation <pgsql-docs(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Moving tablespaces
Date: 2011-12-04 16:41:30
Message-ID: 23636.1323016890@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers

Magnus Hagander <magnus(at)hagander(dot)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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Magnus Hagander 2011-12-04 16:47:11 Re: Moving tablespaces
Previous Message Magnus Hagander 2011-12-04 16:22:33 Re: Moving tablespaces

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2011-12-04 16:47:11 Re: Moving tablespaces
Previous Message Tom Lane 2011-12-04 16:34:44 Re: Command Triggers