Re: Performance degradation in commit ac1d794

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Performance degradation in commit ac1d794
Дата
Msg-id CA+Tgmoa1dK=mUcfFYJY3gOu6932Dg0dpS=qVf4qL6VxQ=OSAuQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Performance degradation in commit ac1d794  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Thu, Mar 17, 2016 at 11:17 AM, Andres Freund <andres@anarazel.de> wrote:
> Right now, do use a WaitEventSet you'd do something like
>                 WaitEvent   event;
>
>                 ModifyWaitEvent(FeBeWaitSet, 0, waitfor, NULL);
>
>                 WaitEventSetWait(FeBeWaitSet, 0 /* no timeout */, &event, 1);
>
> i.e. use a WaitEvent on the stack to receive the changes. If you wanted
> to get more changes than just one, you could end up allocating a fair
> bit of stack space.
>
> We could instead allocate the returned events as part of the event set,
> and return them. Either by returning a NULL terminated array, or by
> continuing to return the number of events as now, and additionally
> return the event data structure via a pointer.
>
> So the above would be
>
>                 WaitEvent   *events;
>                 int nevents;
>
>                 ModifyWaitEvent(FeBeWaitSet, 0, waitfor, NULL);
>
>                 nevents = WaitEventSetWait(FeBeWaitSet, 0 /* no timeout */, events, 10);
>
>                 for (int off = 0; off <= nevents; nevents++)
>                     ; // stuff

I don't see this as being particularly better.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Performance degradation in commit ac1d794
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: improving GROUP BY estimation