Re: server closed connection on a select query

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: server closed connection on a select query
Дата
Msg-id d854adec0511221002n1838f933h@mail.gmail.com
обсуждение исходный текст
Ответ на Re: server closed connection on a select query  ("Larry Rosenman" <ler@lerctr.org>)
Ответы Re: server closed connection on a select query  (Larry Rosenman <ler@lerctr.org>)
Список pgsql-hackers
Sorry for answering this late.

2005/11/16, Larry Rosenman <ler@lerctr.org>:
> Bruce Momjian wrote:
> > The SCO compiler is so buggy (and for so many years) I see no reason
> > to even look at a bug report from someone using it.
> >
>
> I **REALLY** wish you would STOP saying that, Bruce.  The current OpenServer
> Compiler (UDK), is the same as on UnixWare, and is **MUCH** better than the
> Old SVR3 compiler.
>
> We **REALLY** **SHOULD** look at it.
>
> I'll take the bug report directly to SCO if I get enough detail.
>

I was using cc, exactly "SCO UNIX Development System  Release 5.1.2A
27Jul00". Last week, I tried with "UX:i386cc: INFO: SCO UNIX
Development System  Release 5.2.0A 07Oct05" but I had the same
results. I think I'm doing something wrong but I don't know what.

I launched postgres in standalone mode and a core file is created. I
used gdb on it to see the backtrace :
(gdb) bt
#0  0x081bf5fd in booltestsel ()
#1  0x08141125 in clause_selectivity ()
#2  0x081409d2 in clauselist_selectivity ()
#3  0x0814295b in set_baserel_size_estimates ()
#4  0x0813ff42 in set_plain_rel_pathlist ()
#5  0x0813ff12 in set_base_rel_pathlists ()
#6  0x0813fe1d in make_one_rel ()
#7  0x0814b455 in query_planner ()
#8  0x0814bfa0 in grouping_planner ()
#9  0x0814ba11 in subquery_planner ()
#10 0x0814b6c7 in planner ()
#11 0x08181e07 in pg_plan_query ()
#12 0x08181ea0 in pg_plan_queries ()
#13 0x081820ce in exec_simple_query ()
#14 0x081849dd in PostgresMain ()
#15 0x08161d92 in BackendRun ()
#16 0x081616c9 in BackendStartup ()
#17 0x0815fba8 in ServerLoop ()
#18 0x0815f67c in PostmasterMain ()
#19 0x08127d91 in main ()
#20 0x08074d1a in _start ()

So I tried to work on the booltestsel function
(src/backend/utils/adt/selfuncs.c file). I added some elog statements
to see where problems arise. When I put an elog statement in these
lines, my issue is gone :
/*
* Get first MCV frequency and derive frequency for true
*/
if (DatumGetBool(values[0]))  freq_true = numbers[0];
else  freq_true = 1.0 - numbers[0] - freq_null;

/*
* Next derive frequency for false. Then use these as appropriate
* to derive frequency for each case.
*/
freq_false = 1.0 - freq_true - freq_null;

So, I don't get it. I have absolutely no problems with gcc on linux,
but I have this issue on cc (5.1.2A and 5.2.0A releases).

Larry, if you have some more questions, please ask. I don't know whose
bug it is (c compiler or PostgreSQL... or, perhaps, me) but I want to
get rit of it.

Regards.


--
Guillaume.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Practical error logging for very large COPY
Следующее
От: Bruce Momjian
Дата:
Сообщение: Update to FAQ