Re: Latch for the WAL writer - further reducing idle wake-ups.

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: Latch for the WAL writer - further reducing idle wake-ups.
Дата
Msg-id CAEYLb_XggnfVNWUYv6wvTM5K43YdwsqjN66H4vCUB7FHkQoo=A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Latch for the WAL writer - further reducing idle wake-ups.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Latch for the WAL writer - further reducing idle wake-ups.  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Latch for the WAL writer - further reducing idle wake-ups.  (Peter Geoghegan <peter@2ndquadrant.com>)
Список pgsql-hackers
On 8 May 2012 22:35, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Now that I've actually read the patch, rather than just responding to
> your description of it, I find myself entirely unhappy with the proposed
> changes in the walwriter's sleep logic.  You have introduced race
> conditions (it is NOT okay to reset the latch somewhere below the top of
> the loop)

Yes, there is some checking of flags before the potential ResetLatch()
call, which may be acted on. The code there is almost identical to
that of the extant bgwriter code. I was under the impression that this
did not amount to a race, though it's rather late now, and I'm feeling
under the weather, so I have not taken steps to verify that I have it
right. Arguably, you'd want somebody's SetLatch call to be ignored if

> and degraded the walwriter's signal response time in normal
> non-hibernation state, to solve a problem not in evidence; to wit that
> backends spend too much time signaling the walwriter.  Given the
> location of the only existing SetLatch call for the purpose, I find that
> proposition more than a bit doubtful.

I do too. The elaborate logic to reduce that overhead was nothing more
than a vestige of the first version. I apologise for making such a
basic error.

--
Peter Geoghegan       http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training and Services


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Latch for the WAL writer - further reducing idle wake-ups.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Latch for the WAL writer - further reducing idle wake-ups.