Thread: Tsearch2 dump/reload problem
PostgreSQL 7.4.2 - I'm having some serious problems dumping and reloading a database with utilizes TSearch2. I've followed the directions to-the-letter for dumping and reloading a DB that uses TSearch2 ... When I reload and attempt to access the database I find this in the logs: ERROR: cache lookup failed for function 75769893 Here's another kicker: I've dropped the original database that was (at least) functional. I didn't apply the regprocedure patch before I dumped. I have since applied the regprocedure patch to my tsearch2.sql ... ...I'm desperate... CG __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail
On Wed, 28 Jul 2004 09:42:38 -0700 (PDT), Chris Gamache <cgg007@yahoo.com> wrote: > PostgreSQL 7.4.2 - > > I'm having some serious problems dumping and reloading a database with utilizes > TSearch2. > > I've followed the directions to-the-letter for dumping and reloading a DB that > uses TSearch2 ... When I reload and attempt to access the database I find this > in the logs: > > ERROR: cache lookup failed for function 75769893 I _think_ the way round this is to drop all the tsearch2 objects - you should have an untsearch2.sql file in a contrib directory somewhere which contains the appropriate statements. This does of course cascade to tsvector columns, which you will have to recreate and repopulate. FWIW I put all tsearch-related objects into their own schema, and recreate this before restoring other data to a fresh database. HTH Ian Barwick barwick@gmail.com
Check regprocedure_7.4.patch.gz from http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2 It will helps future dump/reload Oleg On Wed, 28 Jul 2004, Ian Barwick wrote: > On Wed, 28 Jul 2004 09:42:38 -0700 (PDT), Chris Gamache > <cgg007@yahoo.com> wrote: > > PostgreSQL 7.4.2 - > > > > I'm having some serious problems dumping and reloading a database with utilizes > > TSearch2. > > > > I've followed the directions to-the-letter for dumping and reloading a DB that > > uses TSearch2 ... When I reload and attempt to access the database I find this > > in the logs: > > > > ERROR: cache lookup failed for function 75769893 > > I _think_ the way round this is to drop all the tsearch2 objects - you > should have an untsearch2.sql file in a contrib directory somewhere > which contains the appropriate statements. This does of course cascade > to tsvector columns, which you will have to recreate and repopulate. > > FWIW I put all tsearch-related objects into their own schema, and > recreate this before restoring other data to a fresh database. > > HTH > > Ian Barwick > barwick@gmail.com > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster > 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
--- Ian Barwick <barwick@gmail.com> wrote: > I _think_ the way round this is to drop all the tsearch2 objects - you > should have an untsearch2.sql file in a contrib directory somewhere > which contains the appropriate statements. This does of course cascade > to tsvector columns, which you will have to recreate and repopulate. > > FWIW I put all tsearch-related objects into their own schema, and > recreate this before restoring other data to a fresh database. Thank you. Dropping and re-loading tsearch2 objects worked like a charm. The regprocedure_7.4.patch.gz actually works now! It's a great feature. I wish I had noticed it sooner. I wonder why it didn't make it into pgsql-announce? I am still considering your suggestion for putting the tsearch2 objects into their own schema: Nice and clean. CG __________________________________ Do you Yahoo!? New and Improved Yahoo! Mail - Send 10MB messages! http://promotions.yahoo.com/new_mail
hello... I had another problem... I have table with tsvector type. When I run pg_dump database > file.dat in the file.dat is in order first declaration of table and after that declaration of type tsvector... After psql database < file.dat it returns error: ERROR: type "tsvector" does not exist ERROR: relation "t_auto_detail_seller" does not exist ERROR: relation "t_auto_detail_seller" does not exist any suggestions??? thanx... hlk
Michal Hlavac wrote: > hello... > > I had another problem... I have table with tsvector type. > When I run pg_dump database > file.dat > > in the file.dat is in order first declaration of table and after that > declaration of type tsvector... > > After psql database < file.dat it returns error: > ERROR: type "tsvector" does not exist > ERROR: relation "t_auto_detail_seller" does not exist > ERROR: relation "t_auto_detail_seller" does not exist > sorry, solved... there was problem with regprocedure_7.4.patch.gz too... I had installed patch, but database needs to be reloaded with these steps: database e.g. hlk 1. shell: dump hlk > hlk.dat 2. psql: drop database hlk; create database hlk; 3. shell: psql hlk < tsearch2.sql 4. shell: psql hlk < hlk.dat 5. shell: pg_dump hlk_new.dat and after that hlk_new.dat is correct... hlavki