Re: [GENERAL] Restoring a Databases that features tserach2

From: Fischer Ulrich <ulrich(dot)fischer(at)aerodynamics(dot)ch>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: a(dot)schmitz(at)cityweb(dot)de, pgsql-admin(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Restoring a Databases that features tserach2
Date: 2004-04-22 14:28:18
Message-ID: 4087D682.6020803@aerodynamics.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

Tom Lane wrote:
> Fischer Ulrich <ulrich(dot)fischer(at)aerodynamics(dot)ch> writes:
>
>>pg_dump (PostgreSQL) 7.3.2
>
>
>> (pg_dumpall -g GLOBALobjects.sql)
>> pg_dump -s DATABASE > DBschema.sql
>> pg_dump -Fc DATABASE > DBdata.tar
>
>
>>and rebuilt on the new system with:
>
>
>>psql (PostgreSQL) 7.4.1
>> 1. createdb DATABASE
>> 2. (psql DATABASE < GLOBALobjects.sql)
>> 3. psql DATABASE < tsearch2.sql
>> 3.a. psql DATABASE < setup_ge_ispell.sql
>> 4. psql DATABASE < DBschema.sql
>> 5. pg_restore -N -a -v -d DATABASE DBdata.tar
>
>
> This is certainly not going to work because the dump from the old
> database will already have all the tsearch2 objects, not to mention
> whatever setup_ge_ispell.sql may create. You should get rid of steps
> 3 and 3a.

Get rid of Step 3 and 3a produces Errors in Step 4 like:

:
CREATE TABLE
REVOKE
GRANT
CREATE TABLE
REVOKE
GRANT
ERROR: type "tsvector" does not exist
ERROR: relation "mitarbeiter" does not exist
:

So I think this is not a good idea ;-) I've got now a Sollution which
I'll post after writing and testing my own HowTo!

regards

Ulrich

>
>
>>There is no difference when dumped with "pg_dump (PostgreSQL) 7.4.1". I
>>get the same error. When I do not update the dict-settings
>>(setup_ge_ispell.sql) I can not even restore the other datas.
>
>
> If you're still having trouble, try dropping the -N option to pg_restore.
> I don't know why that option even exists ... there is no practical use
> to it AFAIK.
>
> regards, tom lane
>
>

--
Ulrich G. Fischer Dipl. Natw. ETH
Center Aerodynamics Ruag Aerospace
P.O. Box 301 CH-6032 Emmen
Tel. +41 41 268 23 53 Fax. +41 41 268 38 97
ulrich(dot)fischer(at)aerodynamics(dot)ch www.ruag.com

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message JC Jan Christensen 2004-04-22 15:16:42 INITDB-error - end-of-copy marker error
Previous Message Fischer Ulrich 2004-04-22 13:56:40 Re: [GENERAL] Restoring a Databases that features tserach2

Browse pgsql-general by date

  From Date Subject
Next Message Michael Chaney 2004-04-22 14:34:36 Re: FW: Postgres alongside MS SQL Server
Previous Message Mike Nolan 2004-04-22 14:26:06 Re: What is wrong here?