| От | Tom Lane |
|---|---|
| Тема | Re: backends stuck in "startup" |
| Дата | |
| Msg-id | 8341.1511309760@sss.pgh.pa.us обсуждение |
| Ответ на | Re: backends stuck in "startup" (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-general |
I wrote:
> ... Maybe we need
> to take a closer look at where LWLocks devolve to blocking on the process
> semaphore and see if there's any implicit assumptions about barriers there.
Like, say, here:
for (;;) { PGSemaphoreLock(proc->sem); if (!proc->lwWaiting) break;
extraWaits++; }
which is exactly where Justin's backend is stuck. Without a read barrier
after the PGSemaphoreLock, it seems possible that we might not see our
lwWaiting as cleared yet, causing the loop to go around an extra time and
wait for a sema wakeup that will never come. Then, we are holding the
lock but are blocked anyway, and everyone else who wants that same lock
will queue up behind us.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера