Re: [HACKERS] More race conditions in logical replication

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [HACKERS] More race conditions in logical replication
Дата
Msg-id 20170707225230.oucbqrx4myqbrtqy@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: [HACKERS] More race conditions in logical replication  (Petr Jelinek <petr.jelinek@2ndquadrant.com>)
Ответы Re: [HACKERS] More race conditions in logical replication  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [HACKERS] More race conditions in logical replication  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Petr Jelinek wrote:

> So best idea I could come up with is to make use of the new condition
> variable API. That lets us wait for variable which can be set per slot.
> 
> It's not backportable however, I am not sure how big problem that is
> considering the lack of complaints until now (maybe we could backport
> using the ugly timeout version?).
> 
> The attached patch is a prototype of such solution and there are some
> race conditions (variable can get signaled before the waiting process
> starts sleeping for it). I am mainly sending it to get feedback on the
> approach.

This one looks a lot better than the original one.

I wonder if it's possible to do this using lwlocks instead of condition
variables (similar to how we do the "wait for IO" thing both for slots
and buffers).  We could backport that easily ...

I'll next update this on or before Monday 10th at 19:00 CLT.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] [WIP] Zipfian distribution in pgbench
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] More race conditions in logical replication