Re: BUG: Vacuum Analyze - datumGetSize: Invalid typLen 0

From: "Thomas T(dot) Thai" <tom(at)minnesota(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: BUG: Vacuum Analyze - datumGetSize: Invalid typLen 0
Date: 2003-03-27 04:51:19
Message-ID: 3960.63.226.186.156.1048740679.squirrel@mail.minnesota.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Please also note that if you change the data type from text to int, then
the test succeeds:

CREATE TABLE wow_cfgmap (
ts_id int
);

insert into wow_cfgmap values (1);
insert into wow_cfgmap values (2);

CREATE TABLE wow_cfg (
ts_id int
);

insert into wow_cfg values (1);

select
*
from
wow_cfgmap,
wow_cfg
where
wow_cfgmap.ts_id = wow_cfg.ts_id;

vacuum analyze wow_cfgmap;

select
*
from
wow_cfgmap,
wow_cfg
where
wow_cfgmap.ts_id = wow_cfg.ts_id;

> System: NetBSD / Alpha 1.6 (64 bit)
> Postgresql 7.3.2
>
> Bug: after vacuum analyze, I'm unable to do a simple select. Instead I'm
> getting this error:
>
> ERROR: datumGetSize: Invalid typLen 0
>
> Many thanks to Teodor Sigaev for helping verify this bug. The following
> test suite came from Teodor:
>
> Reproduce bug:
> initdb and start postmaster
> %createdb foo
> %psql foo < bug.sql
> CREATE TABLE
> INSERT 16996 1
> INSERT 16997 1
> CREATE TABLE
> INSERT 17003 1
> ts_name | ts_name
> ---------+---------
> default | default
> default | default
> (2 rows)
>
> VACUUM
> ERROR: datumGetSize: Invalid typLen 0
>
>
> bug.sql is very simple:
> ------------------------------------------------
> CREATE TABLE pg_ts_cfgmap (
> ts_name text
> );
>
> insert into pg_ts_cfgmap values ('default');
> insert into pg_ts_cfgmap values ('default');
>
>
> CREATE TABLE pg_ts_cfg (
> ts_name text
> );
>
> insert into pg_ts_cfg values ('default');
>
> select
> *
> from
> pg_ts_cfgmap,
> pg_ts_cfg
> where
> pg_ts_cfgmap.ts_name = pg_ts_cfg.ts_name;
>
>
> vacuum analyze pg_ts_cfgmap;
>
> select
> *
> from
> pg_ts_cfgmap,
> pg_ts_cfg
> where
> pg_ts_cfgmap.ts_name = pg_ts_cfg.ts_name;
>
> ---------------------------------------------------
>
> Thomas
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-03-27 04:57:51 Re: updateable cursors & visibility
Previous Message Bruce Momjian 2003-03-27 04:50:59 Re: A bad behavior under autocommit off mode