Re: Backend crash with user defined aggregate

Поиск
Список
Период
Сортировка
От Ron Mayer
Тема Re: Backend crash with user defined aggregate
Дата
Msg-id 4334E5F2.8030702@cheapcomplexdevices.com
обсуждение исходный текст
Ответ на Re: Backend crash with user defined aggregate  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Backend crash with user defined aggregate  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Tom Lane wrote:
> Ron Mayer <rm_pg@cheapcomplexdevices.com> writes:
>>...aggregate function that concatenates
>>any non-null strings it encounters...crashes...
>
> I tried this example in CVS tip and didn't see any particular misbehavior.

One thing is that my table is quite large (20 GB or so of data in that
table with most of it in that column called 'val' being aggregated).
When I try it on small tables (100k rows) I get no problems.


> What PG version are you running?

fli=# select version();
                                        version
-------------------------------------------------------------------------------------
  PostgreSQL 8.0.2 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.3 (SuSE Linux)
(1 row)

> Does EXPLAIN show that the query is
> being done with a group or hash aggregation?

Fails the same way in each case.  It was doing a HashAggregate last time; but
I just reproduced it now with a GroupAggregate.


fli=#
fli=# explain select ext_doc_id,strcat_agg(nam)||+strcat_agg(val) from facet_raw group by ext_doc_id;
                                 QUERY PLAN
---------------------------------------------------------------------------
  HashAggregate  (cost=216543.88..216737.30 rows=9671 width=46)
    ->  Seq Scan on facet_raw  (cost=0.00..118746.32 rows=5588432 width=46)
(2 rows)

fli=# set enable_hashagg = false;
SET
fli=# explain select ext_doc_id,strcat_agg(nam)||+strcat_agg(val) from facet_raw group by ext_doc_id;
                                    QUERY PLAN
---------------------------------------------------------------------------------
  GroupAggregate  (cost=951426.23..1063388.29 rows=9671 width=46)
    ->  Sort  (cost=951426.23..965397.31 rows=5588432 width=46)
          Sort Key: ext_doc_id
          ->  Seq Scan on facet_raw  (cost=0.00..118746.32 rows=5588432 width=46)
(4 rows)

fli=# explain analyze select ext_doc_id,strcat_agg(nam)||+strcat_agg(val) from facet_raw group by ext_doc_id;
FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
         This probably means the server terminated abnormally
         before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
fli=#


>  What do you have sort_mem set to?


fli=# show sort_mem;
  work_mem
----------
  51829
(1 row)

fli=#


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

Предыдущее
От: Michael Fuhr
Дата:
Сообщение: Re: question about to return two diferent tables from a function
Следующее
От: Oleg Bartunov
Дата:
Сообщение: Re: tsearch2 for alphabetic character strings & codes