Re: [GENERAL] Tsearch2 cache lookup problem

2006-03-09 Thread matroska

I made a restore from a database without tsearch2 installed, installed
tsearch2 executing tsearch2.sql and than used it successfully. One day after
this i obtained that error as if a database corruption occurred...however
noone has touched the database...

Thanks for the answers
John slave
--
View this message in context: 
http://www.nabble.com/Tsearch2-cache-lookup-problem-t1246642.html#a3322653
Sent from the PostgreSQL - general forum at Nabble.com.


---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match


Re: [GENERAL] Tsearch2 cache lookup problem

2006-03-09 Thread Richard Huxton

Tom Lane wrote:

Richard Huxton  writes:

Matroska80 wrote:

Hi i have a problem using tsearch2 with postgresql. Executing:
SELECT to_tsquery('default','kj');
return a 
cache lookup failed for function 141542.



Try the following:
SELECT oid,* FROM pg_proc WHERE proname='to_tsquery';
That should show whether there is a function with that OID.


My recollection is that older versions of tsearch2 use a configuration
table that stores function OIDs.  If you dump and restore that table
verbatim then you'll get failures like this because the new installation
has different OIDs for those functions.  See the tsearch2 documentation
for workarounds, but I think you're supposed to install tsearch2 before
you restore the old dump.


Yes, you:
1. Create the db
2. Install tsearch2
3. do a pg_restore -l/-L and remove the tsearch2 elements when restoring.

However, Matroska80 did say that no dump/restore had occurred. That is 
right, isn't it?


--
  Richard Huxton
  Archonet Ltd

---(end of broadcast)---
TIP 4: Have you searched our list archives?

  http://archives.postgresql.org


Re: [GENERAL] Tsearch2 cache lookup problem

2006-03-08 Thread Tom Lane
Richard Huxton  writes:
> Matroska80 wrote:
>> Hi i have a problem using tsearch2 with postgresql. Executing:
>> SELECT to_tsquery('default','kj');
>> return a 
>> cache lookup failed for function 141542.

> Try the following:
> SELECT oid,* FROM pg_proc WHERE proname='to_tsquery';
> That should show whether there is a function with that OID.

My recollection is that older versions of tsearch2 use a configuration
table that stores function OIDs.  If you dump and restore that table
verbatim then you'll get failures like this because the new installation
has different OIDs for those functions.  See the tsearch2 documentation
for workarounds, but I think you're supposed to install tsearch2 before
you restore the old dump.

regards, tom lane

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [GENERAL] Tsearch2 cache lookup problem

2006-03-08 Thread Richard Huxton

Matroska80 wrote:

Hi i have a problem using tsearch2 with postgresql. Executing:
SELECT to_tsquery('default','kj');

return a 
cache lookup failed for function 141542.


Try the following:
SELECT oid,* FROM pg_proc WHERE proname='to_tsquery';

That should show whether there is a function with that OID.


But it's strange this happens now but not before and nothing has done on
database...some data break with tsearch2?
I am using postgres 7.4.6 and no dump restore occurs before this error
appear.


Either you have database corruption or something has clobbered your 
function definition.


Oh, and upgrade to the latest 7.4.x series too - lots of bug-fixes 
you'll want to get.


--
  Richard Huxton
  Archonet Ltd

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

  http://www.postgresql.org/docs/faq


Re: [GENERAL] Tsearch2 cache lookup problem

2006-03-08 Thread Richard Huxton

Matroska80 wrote:

Hi i have a problem using tsearch2 with postgresql. Executing:
SELECT to_tsquery('default','kj');

return a 
cache lookup failed for function 141542.


(adding to my previous reply)
Or it could be a problem with that OID. Also try:

SELECT oid,* FROM pg_proc WHERE oid=14152;

--
  Richard Huxton
  Archonet Ltd

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[GENERAL] Tsearch2 cache lookup problem

2006-03-08 Thread Matroska80

Hi i have a problem using tsearch2 with postgresql. Executing:
SELECT to_tsquery('default','kj');

return a 
cache lookup failed for function 141542.

But it's strange this happens now but not before and nothing has done on
database...some data break with tsearch2?
I am using postgres 7.4.6 and no dump restore occurs before this error
appear.

Yours faithfully
John Slave
--
View this message in context: 
http://www.nabble.com/Tsearch2-cache-lookup-problem-t1246642.html#a3301238
Sent from the PostgreSQL - general forum at Nabble.com.


---(end of broadcast)---
TIP 6: explain analyze is your friend