Re: tablespace restore - Mailing list pgsql-general

From Matthew Walden
Subject Re: tablespace restore
Date
Msg-id AANLkTimFB7eSxnU39BHnuGSTJuHrXbnktH+ibrKebECA@mail.gmail.com
Whole thread Raw
In response to Re: tablespace restore  (Vangelis Katsikaros <ibob17@yahoo.gr>)
List pgsql-general
The problem is that there is a lot of metadata outside the tablespace you created (information that the catalog tables keep on your new database and its objects) and this can only be restored with a full restore which would overwrite your pre-existing databases on your target.  I hate to say it can't be done because someone will prove me wrong but I think pg_dump is your only answer even if you do need to give it some time and then rebuild the indexes.

That said, perhaps someone else can confirm or deny this too.

On Fri, Nov 19, 2010 at 1:30 PM, Vangelis Katsikaros <ibob17@yahoo.gr> wrote:
On 11/19/2010 03:12 PM, Matthew Walden wrote:
Vangelis,

I don't believe you can do file level copying of single databases
(especially as they are different versions).

Hi Matthew, thanks for your answer.

If the different versions is a problem, I can downgrade one server and then upgrade afterwards.


Take a look at pg_dump in the documentation.  This will do what you need I
think but at a logical level rather than physical.

Hm, from what I understand pg_dump doesn't dump indexes (ie the indexing information - not an SQL clause in CREATE TABLE). Also I have lots of Giga of data, so I imagine that pg_restore will take quite some time to execute the INSERTs and reindex.

Regards
Vangelis

pgsql-general by date:

Previous
From: Vangelis Katsikaros
Date:
Subject: Re: tablespace restore
Next
From: Tomas Vondra
Date:
Subject: Re: How to identify whether the stats were reset?