Re: BUG #8410: out of binary heap slots

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: BUG #8410: out of binary heap slots
Дата
Msg-id 20130830213012.GD8932@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: BUG #8410: out of binary heap slots  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
On 2013-08-30 17:23:51 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.com> writes:
> > No need, found the bug. And I think can build a testcase myself.
>
> > ExecReScanMergeAppend resets ms_initialized, but doesn't clear the
> > binaryheap. Thus no new elements fit.
>
> Sounds like a bug all right, but I'm not convinced it explains Terje's
> report.  The thing this theory doesn't explain is why would Terje be
> having trouble reproducing the failure?  Seems like re-running the same
> query ought to produce the same failure.

The number of rescans can be rather data-dependant, so I'd guess that's
the reason. If many of the subplans don't return a tuple, it can take
several resets to actually ever reach the heap's limit as we don't
add the subplan to the heap in that case.

Greetings,

Andres Freund

--
 Andres Freund                       http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: BUG #8410: out of binary heap slots
Следующее
От: Terje Elde
Дата:
Сообщение: Re: BUG #8410: out of binary heap slots