dbTalk Databases Forums  

[BUGS] BUG #1853: explain gives ERROR: bogus varno: 23

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] BUG #1853: explain gives ERROR: bogus varno: 23 in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dustin Sallings
 
Posts: n/a

Default [BUGS] BUG #1853: explain gives ERROR: bogus varno: 23 - 08-28-2005 , 09:09 AM







The following bug has been logged online:

Bug reference: 1853
Logged by: Dustin Sallings
Email address: dustin (AT) spy (DOT) net
PostgreSQL version: 8.1b1
Operating system: Mac OS X 10.3.something
Description: explain gives ERROR: bogus varno: 23
Details:

If I run this query on my model:

select
sensor_id,
min(sample) as min_reading,
avg(sample) as avg_reading,
stddev(sample) as stddev_reading,
max(sample) as max_reading,
date(ts) as day
from
samples
where
ts >= (select max(day)+1 from rollups_day)
and ts < current_date
group by
sensor_id, day


It works by itself, but if I run it in explain, it fails with the following
error:

ERROR: bogus varno: 23


.... I've so far been unable to make a standalone sample break because I
don't quite understand the problem.

samples is a view made of up union alls to a bunch of tables like this:

View definition:
((((( SELECT samples_1999.ts, samples_1999.sensor_id, samples_1999.sample
FROM samples_1999
UNION ALL
SELECT samples_2000.ts, samples_2000.sensor_id, samples_2000.sample
FROM samples_2000)
UNION ALL
SELECT samples_2001.ts, samples_2001.sensor_id, samples_2001.sample
FROM samples_2001)
UNION ALL
SELECT samples_2002.ts, samples_2002.sensor_id, samples_2002.sample
FROM samples_2002)
UNION ALL
SELECT samples_2003.ts, samples_2003.sensor_id, samples_2003.sample
FROM samples_2003)
UNION ALL
SELECT samples_2004.ts, samples_2004.sensor_id, samples_2004.sample
FROM samples_2004)
UNION ALL
SELECT samples_2005.ts, samples_2005.sensor_id, samples_2005.sample
FROM samples_2005;


I don't have any confidential data in this database, so I can provide the
entire thing if necessary, but it is a rather large database.

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

http://archives.postgresql.org

Reply With Quote
  #2  
Old   
Michael Fuhr
 
Posts: n/a

Default Re: [BUGS] BUG #1853: explain gives ERROR: bogus varno: 23 - 08-28-2005 , 09:16 AM






On Sun, Aug 28, 2005 at 06:13:12AM +0100, Dustin Sallings wrote:
Quote:
PostgreSQL version: 8.1b1
Description: explain gives ERROR: bogus varno: 23
This might be the same problem that was fixed yesterday:

http://archives.postgresql.org/pgsql...8/msg00374.php

Try building the latest code from CVS and see if you still get the
error.

Do you get the error if you execute "SET enable_bitmapscan TO off;"
and then run EXPLAIN?

--
Michael Fuhr

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo (AT) postgresql (DOT) org so that your
message can get through to the mailing list cleanly


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.