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

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 (view raw or flat)
Thread:
Lists: pgsql-docspgsql-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

pgsql-docs by date

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

pgsql-hackers by date

Next:From: Magnus HaganderDate: 2011-12-04 16:47:11
Subject: Re: Moving tablespaces
Previous:From: Tom LaneDate: 2011-12-04 16:34:44
Subject: Re: Command Triggers

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