Re: correcting tablespaces inside data folder

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Duarte Carreira <dncarreira(at)gmail(dot)com>
Cc: pgsql-general General <pgsql-general(at)postgresql(dot)org>
Subject: Re: correcting tablespaces inside data folder
Date: 2018-07-06 16:49:40
Message-ID: CABUevEy+ahDZet1vhcaSLkNyuX9=XLbub=seUh3fXPPaacc4Lw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jul 6, 2018 at 6:42 PM, Duarte Carreira <dncarreira(at)gmail(dot)com>
wrote:

> Hello.
>
> Yes I'm one of those guys who only recently realized the mess of having
> tablespaces inside the data directory... now I want to use pg_upgrade and
> it will make things even worse...
>
> Does anyone have a best approach to this problem? Fastest/safest?
>
> pg 9.3.x on win
>
>
If you can afford to shut the server down, the easiest is to shut it down,
move the tablespaces (with mv, and as long as you stay within the partition
it should be almost instant), update the symlinks to point to the new
location, and start it up again.

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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Duarte Carreira 2018-07-06 17:05:28 Re: correcting tablespaces inside data folder
Previous Message Moreno Andreo 2018-07-06 16:44:38 Re: Role problem in Windows