Обсуждение: Tsearch2 cache lookup problem

Поиск
Список
Период
Сортировка

Tsearch2 cache lookup problem

От
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.


Re: Tsearch2 cache lookup problem

От
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

Re: Tsearch2 cache lookup problem

От
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

Re: Tsearch2 cache lookup problem

От
Tom Lane
Дата:
Richard Huxton <dev@archonet.com> 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

Re: Tsearch2 cache lookup problem

От
Richard Huxton
Дата:
Tom Lane wrote:
> Richard Huxton <dev@archonet.com> 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

Re: Tsearch2 cache lookup problem

От
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.