Re: Problem with restoring dump (may be tsearch-related)

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Markus Wollny <Markus(dot)Wollny(at)computec(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Problem with restoring dump (may be tsearch-related)
Date: 2002-09-06 13:07:51
Message-ID: Pine.GSO.4.44.0209061601260.884-100000@ra.sai.msu.su
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 6 Sep 2002, Markus Wollny wrote:

> Hi!
>
> Okay, I've been successful with the following strategy:
>
> 1. Compile&install postgresql
> 2. initdb
> 3. compile&install tsearch
> 4. CREATE DATABASE template2 WITH TEMPLATE = template0;
> This is because template1 cannot be used as template for new databases
> during restore, so another template is needed.
> 5. ./psql -d template2 < tsearch.sql
> Now I've added the customs bits to the new template
> 6. perl perl -pi -e "s/template0/template2/g;" alldb1.sql
> This just replaces the standard template in the dump with the new one
> 7. ./psql -d template1 -f alldb1.sql
> I'm happy :)

Congratulations ! Hope Tom will comment this procedure

>
> Or should I fear any drawbacks of this method? The only kind of
> error-messages I got during restore where those "function ... already
> exists with same argument types", type named ... already exists" and
> "OperatorDef: operator "##" already defined" - and I think I can safely
> ignore them :)
>

because they're already defined in tsearch.sql. if everything works
properly, then you ignore them. Probably, the problem should go to
FAQ if pg_dump is still broken in this respect.

> Regards,
>
> Markus
>
> > -----UrsprЭngliche Nachricht-----
> > Von: Markus Wollny
> > Gesendet: Freitag, 6. September 2002 13:02
> > An: 'Oleg Bartunov'
> > Cc: Tom Lane; pgsql-general(at)postgresql(dot)org
> > Betreff: AW: AW: [GENERAL] Problem with restoring dump (may be
> > tsearch-related)
> >
> >
> > Hi!
> >
> > I'll find out later on - this requires editing files of
> > 180MB/750MB. That may take a while... I'd be quite happy to
> > find a quicker, preferrably automatable solution.
> >
> > Regards,
> >
> > Markus
> >
> > > -----UrsprЭngliche Nachricht-----
> > > Von: Oleg Bartunov [mailto:oleg(at)sai(dot)msu(dot)su]
> > > Gesendet: Freitag, 6. September 2002 13:42
> > > An: Markus Wollny
> > > Cc: Tom Lane; pgsql-general(at)postgresql(dot)org
> > > Betreff: Re: AW: [GENERAL] Problem with restoring dump (may be
> > > tsearch-related)
> > >
> > >
> > > It's well known problem with dump - is't solved in 7.3 ?
> > > btw, did editing of dump file help ?
> > >
> > > Oleg
> > > On Fri, 6 Sep 2002, Markus Wollny wrote:
> > >
> > > > Hi!
> > > >
> > > > No, I didn't - the DB is quite large, so it's crucial that
> > > dump has got
> > > > acceptable speed - which it hasn't got when using
> > > --inserts; as I found
> > > > out it seems to be a matter of sequence of the created
> > > objects in the
> > > > dump, anyway, so that wouldn't have helped, I think. As
> > far as I can
> > > > see, dump always writes the table-definitions _before_ the
> > > > customs-datatype-definitions. Which is causing trouble,
> > because the
> > > > statements for creating tables that use custom datatypes
> > like txtidx
> > > > thus result in an error but not in a table. So when the
> > > COPY-statement
> > > > follows, which should fill the table, it finds nothing to
> > > fill - and
> > > > that causes all these errors.
> > > >
> > > > Regards,
> > > >
> > > > Markus
> > > >
> > > > > -----Ursprungliche Nachricht-----
> > > > > Von: Oleg Bartunov [mailto:oleg(at)sai(dot)msu(dot)su]
> > > > > Gesendet: Donnerstag, 5. September 2002 20:02
> > > > > An: Markus Wollny
> > > > > Cc: Tom Lane; pgsql-general(at)postgresql(dot)org
> > > > > Betreff: Re: [GENERAL] Problem with restoring dump (may be
> > > > > tsearch-related)
> > > > >
> > > > >
> > > > > Markus, did you try dump with --inserts option ?
> > > > >
> > > >
> > >
> > > Regards,
> > > Oleg
> > > _____________________________________________________________
> > > Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
> > > Sternberg Astronomical Institute, Moscow University (Russia)
> > > Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
> > > phone: +007(095)939-16-83, +007(095)939-23-83
> > >
> > >
> >
>

Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-09-06 13:13:22 Re: 7.3b1 installation
Previous Message frbn 2002-09-06 12:35:34 Re: Attempt to connect to database using libpq++ PgDatabase