Re: TSearch Related? - ERROR: datumGetSize: Invalid typLen

From: "Thomas T(dot) Thai" <tom(at)minnesota(dot)com>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Cc: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
Subject: Re: TSearch Related? - ERROR: datumGetSize: Invalid typLen
Date: 2003-03-21 02:54:28
Message-ID: Pine.NEB.4.44.0303202050140.22773-100000@ns01.minnesota.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, 20 Mar 2003, Thomas T. Thai wrote:

> NetBSD 1.6 / Alpha 64-bit
> PostgreSQL 7.3.2
> PHP-4.3.2
>
> I did a vacuum analyze on a live database. Then after queries to a db from
> the web page returned 0 results when it should have lots of results. Then
> the console showed the postgresql error:
>
> ERROR: datumGetSize: Invalid typLen 0
>
> There have been a similar bug reported:
>
> http://archives.postgresql.org/pgsql-bugs/2002-12/msg00216.php
>
> The odd thing is that ps showed this stale postmaster running which is the
> only one accessing the db:
>
> pgsql 18458 11935 11926 7e13c0 0 SWN p1 0:00.00 postmaster: pgsql
> yellowpages [local] idle (postgres)
>
> That was the DB that was vacuum analyze.
>
> If I query the same query from psql session, I get results. Apparently,
> PHP is trying to access postgresql using that stale process above and
> isn't able to connect to the DB.
>
> I restarted PostgreSQL but still had the same problems.

Once I restarted postgresql, I no longer am able to perform the same query
that succeeded before in pgsql but failed in the web page via PHP.

The only thing that was different was I updated to the newer version of
tsearch v2 that allowed empty strings in txtidx fields.

yellowpages=# SELECT COUNT(*) AS count FROM phone_address AS p WHERE
p.name_fts @@ txt2query('acme')
yellowpages-# ;
ERROR: datumGetSize: Invalid typLen 0
ERROR: datumGetSize: Invalid typLen 0
yellowpages=# ERROR: datumGetSize: Invalid typLen 0

--
Thomas T. Thai

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Shridhar Daithankar<shridhar_daithankar@persistent.co.in> 2003-03-21 03:29:39 Re: Extracting time from timestamp
Previous Message Thomas T. Thai 2003-03-21 02:44:49 ERROR: datumGetSize: Invalid typLen 0