Re: tablespace restore

From: Matthew Walden <matthew(dot)walden(at)bcs(dot)org>
To: Vangelis Katsikaros <ibob17(at)yahoo(dot)gr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: tablespace restore
Date: 2010-11-19 13:37:07
Message-ID: AANLkTimFB7eSxnU39BHnuGSTJuHrXbnktH+ibrKebECA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)yahoo(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tomas Vondra 2010-11-19 14:09:41 Re: How to identify whether the stats were reset?
Previous Message Vangelis Katsikaros 2010-11-19 13:30:13 Re: tablespace restore