Re: [HACKERS] psql and \do - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] psql and \do
Date
Msg-id 199907071031.GAA21817@candle.pha.pa.us
Whole thread Raw
In response to psql and \do  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
> I am getting an crash on psql \do when assert checking is enabled.  The
> problem is in cost_seqscan() where temp is not > 0.
> 
> Not sure on the cause yet.

I have cleaned up some areas, but now cost_index() is getting that
problem with temp as NaN because it has exceeded it's range or something
strange like that.

Does psql \do work on stock 6.5?

Here is the weird part.  This is with no optimization, and of course the
assert at the end fails on the test temp >= 0.    Breakpoint 1, cost_index (indexid=17033,
expected_indexpages=137251568,    selec=0.00877192989, relpages=2, reltuples=114, indexpages=2,     indextuples=114,
is_injoin=1'\001') at costsize.c:132132             Cost            temp = 0;(gdb) n134             if
(!_enable_indexscan_&& !is_injoin)(gdb) 142             if (expected_indexpages <= 0)(gdb) 144             if
(indextuples<= 0)(gdb) print temp$1 = 0(gdb) n148             temp += expected_indexpages;(gdb) print temp$2 = 0(gdb)
n156            temp += ceil(((double) selec) * ((double) relpages));(gdb) print temp$3 = -NaN(0x400000)(gdb) print
expected_indexpages$4= 137251568
 

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: psql and \do
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] psql and \do