BUG #9735: Error: "ERROR: tuple offset out of range: 0" during bitmap scan - Mailing list pgsql-bugs

From maxim.boguk@gmail.com
Subject BUG #9735: Error: "ERROR: tuple offset out of range: 0" during bitmap scan
Date
Msg-id 20140326121111.1150.64470@wrigleys.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      9735
Logged by:          Maxim Boguk
Email address:      maxim.boguk@gmail.com
PostgreSQL version: 9.3.3
Operating system:   Linux
Description:

Hi,

An application start getting curious error during simple query:

select * from transactions where  (date(provider_tx_datetime) =
'2014-03-13'::date);
ERROR:  tuple offset out of range: 0

Plan:
 Bitmap Heap Scan on transactions  (cost=614.04..32037.39 rows=167485
width=608)
   Recheck Cond: (date(provider_tx_datetime) = '2014-03-13'::date)
   ->  Bitmap Index Scan on transactions_tx_prv_tx_dt_date_idx21
(cost=0.00..572.17 rows=167485 width=0)
         Index Cond: (date(provider_tx_datetime) = '2014-03-13'::date)

What doesn't helped:
set vacuum_freeze_table_age to 0;
vacuum freeze verbose transactions;
and rebuilding the transactions_tx_prv_tx_dt_date_idx21 index.

What helped:
set enable_bitmapscan to 0;
and executing the same query again
with plan:
 Index Scan using transactions_tx_prv_tx_dt_date_idx21 on transactions
(cost=0.56..33915.12 rows=167485 width=608) (actual time=0.047..1233.998
rows=195824 loops=1)
   Index Cond: (date(provider_tx_datetime) = '2014-03-13'::date)
 Total runtime: 1247.688 ms
afterward.

This situation repeated more few times over the last days (with diferen
dateranges).

Any suggestions where and what for I should look next?

It seems somehow related with visibility map and bitmap scan interaction
(only my theory though).

Kind Regards,
Maksym

pgsql-bugs by date:

Previous
From: Daniel Hahler
Date:
Subject: Re: BUG #9721: Fatal error on startup: no free slots in PMChildFlags array
Next
From: Tom Lane
Date:
Subject: Re: BUG #9722: select ILIKE is not case insensitive in UTF8 cyrillic