Re: Restarting DB after moving to another drive - Mailing list pgsql-general

From Daniel Begin
Subject Re: Restarting DB after moving to another drive
Date
Msg-id COL129-DS165D70969DF68430F13D7394DB0@phx.gbl
Whole thread Raw
In response to Re: Restarting DB after moving to another drive  (Francisco Olarte <folarte@peoplecall.com>)
Responses Re: Restarting DB after moving to another drive  (Marc Mamin <M.Mamin@intershop.de>)
Re: Restarting DB after moving to another drive  (Francisco Olarte <folarte@peoplecall.com>)
List pgsql-general
Francisco wrote: "How big/critical is your database?"

How big? According to PgAdmin my personal database is about 2TB...
How critical? Well, about a year of work!-)

Francisco wrote: "just did a stop/cp/change pgdata /restart, I suppose windows must have comparable ways"
This is what I have just tried when I got “Could not read symbolic link “pg_tblspc/100589”: Invalid argument”

Considering both drives are identical, could an image backup have done the job properly instead of a plane copy?
Daniel

-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of Francisco Olarte
Sent: May-11-15 11:01
To: Daniel Begin
Cc: rod@iol.ie; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Restarting DB after moving to another drive

Hi Daniel.

On Mon, May 11, 2015 at 4:42 PM, Daniel Begin <jfd553@hotmail.com> wrote:
> Just to make sure I understand properly...
> When I installed Postgresql, I set $PGDATA to point on my old drive
> and I must now move everything on the new one.
> In order to move everything on the new drive I must create a
> tablespace on the new drive and then explicitly define this tablespace
> as the new location of...
> -  the postgres database
> -  my personal database
> - pg_default
> - pg_global
> Anything I missed or put in the wrong sequence?

I do not think it is that easy. You can move nearly everything, but it will be slow an you are not going to get rid of
theold disk. 

One question, ¿ How big/critical is your database ? because all your problems can be solved with a dump/initdb/restore
easily,and if you can leave it doing overnight it is th easier way. Also, I've moved directories across disks before,
andit has worked, but I use linux which is much simpler, and just did an stop / cp / change pgdata / restart, I suppose
windowsmust have comparable ways. 

Francisco Olarte.


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



pgsql-general by date:

Previous
From: Francisco Olarte
Date:
Subject: Re: How to clean/truncate / VACUUM FULL pg_largeobject without (much) downtime?
Next
From: Marc Mamin
Date:
Subject: Re: Restarting DB after moving to another drive