Re: Cache lookup failure for pg_restore? - Mailing list pgsql-general
From | Oleg Bartunov |
---|---|
Subject | Re: Cache lookup failure for pg_restore? |
Date | |
Msg-id | Pine.GSO.4.58.0405121819280.9525@ra.sai.msu.su Whole thread Raw |
In response to | Re: Cache lookup failure for pg_restore? ("Gellert, Andre" <AGellert@ElectronicPartner.de>) |
List | pgsql-general |
Hi, Below is a email from Andrew Kopciuch who tested the patch and wrote some instruction. sql file is available from http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/regprocedure_update.sql Andrew, could you help Andre with his problem ? Oleg ---------------------------------------------------------------------- Date: Mon, 10 May 2004 16:24:36 -0600 From: Andrew J. Kopciuch <akopciuch@bddf.ca> To: Oleg Bartunov <oleg@sai.msu.su> Subject: Re: patch for tsearch2 is available, please test Oleg: > Andrew, could you, please, test patch and write instruction ? I've done some testing with this patch : > I tried it myself and it works well, backup/restore works fine. > I think, the main problem will be upgrade of tsearch2 and restore data. > I dump sql and data separately, then install new tsearch2 with patch, > created db, load tsearch2.sql, edit tsearch2 configuration and load data. > After that, dump/reload should works fine. I have created an SQL file (attached) that I used to simply alter the current table definitions, and update the data prior to dumping. This way the upgrade is instant ... and from this point on ... simply dumping the database and restoring can be done in typical fashion. pg_dump dbname > dbname.sql createdb dbname psql dbname < dbname.sql Could you look through the file jsut to double check. It may be useful to other people for upgrading. I will go through the Introduction and make some modifications when I can later tonight ... or tomorrow. I will add sections regarding the patch, and leave the current documentation (I don't know why anyone _wouldn't_ apply the patch ... but nothing would surprise me). I will also add instructions about the dump / restore now. It's just like any other DB dump and restore procedure. Andy ---------------------------------------------------------------------------- On Wed, 12 May 2004, Gellert, Andre wrote: > Hello, > > > Recently, we discover how to avoid problem with OIDs backup/restore > > in tsearch2. Check > > http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/ for > > a little patch (regprocedure_7.4.patch.gz). It won't work on > > existed tsearch2 > > installation, though, but will help in future. > > I do have the same problem, after reimporting with the correct command > sequence, > with no errors (I edit the schema to get rid of duplicate functions) , > ( AND: > DELETE from pg_ts_dict; > DELETE from pg_ts_parser ; > DELETE from pg_ts_cfg; > DELETE from pg_ts_cfgmap ; > to avoid duplicate keys - that point is missing in the howto ?) > > I can connect to the DB , but cannot use the tsquery function e.g. . > > Example: > www2=# select set_curcfg('default'); > ERROR: cache lookup failed for function 138031386 > www2=# select to_tsquery('cd&rohling') ; > ERROR: could not find tsearch config by locale > www2=# select set_curcfg('default'); > set_curcfg > ------------ > > (1 row) > > www2=# select to_tsquery('cd&rohling') ; > server closed the connection unexpectedly > This probably means the server terminated abnormally > before or while processing the request. > The connection to the server was lost. Attempting reset: Failed. > ! > --- > I think this is the same problem. The patch is for 7.4.[0|1|2] , not 7.4, i > guess. > > Is there a chance to rebuild a backup from a DB , which runs tsearch2 with > the unpatched tsearch2-schema ? > My idea: Isn't this a thing to be mentioned in the docs ? Restoring a DB > could be a point :-) > > Andre > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html > Regards, Oleg _____________________________________________________________ Oleg Bartunov, sci.researcher, hostmaster of AstroNet, Sternberg Astronomical Institute, Moscow University (Russia) Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/ phone: +007(095)939-16-83, +007(095)939-23-83
pgsql-general by date: