From: | Duarte Carreira <dncarreira(at)gmail(dot)com> |
---|---|
To: | magnus(at)hagander(dot)net |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: correcting tablespaces inside data folder |
Date: | 2018-07-06 17:30:18 |
Message-ID: | CAHE-9zBLe2wx5s329uD+EAZnmvx1MRE3cM-3+sP9cveMOV8ogQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Fri, Jul 6, 2018 at 6:15 PM Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> (please don't top-post. It makes it hard to follow discussions)
>
> On Fri, Jul 6, 2018 at 7:05 PM, Duarte Carreira <dncarreira(at)gmail(dot)com>
> wrote:
>
>> Magnus,
>> You mean changing the symlinks inside pg_tblspc?
>>
>>
> Yes. As long as the server is shut down, you can modify those symlinks.
>
Ok, I'll try on my laptop and see how it goes.
Thanks.
>
>
>
>>
>> On Fri, Jul 6, 2018 at 5:49 PM Magnus Hagander <magnus(at)hagander(dot)net>
>> wrote:
>>
>>> 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/>
>>>
>>
>
>
> --
> Magnus Hagander
> Me: https://www.hagander.net/ <http://www.hagander.net/>
> Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2018-07-06 21:51:38 | Re: User-defined function with anyrange[] |
Previous Message | Magnus Hagander | 2018-07-06 17:15:50 | Re: correcting tablespaces inside data folder |