Re: Sync Rep v19

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Sync Rep v19
Дата
Msg-id AANLkTinpg4MW6wdsKU2FkQ=rN8K2T_92s8ec-i5Ry=+b@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Sync Rep v19  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Sync Rep v19  (Simon Riggs <simon@2ndQuadrant.com>)
Re: Sync Rep v19  (Fujii Masao <masao.fujii@gmail.com>)
Список pgsql-hackers
On Sat, Mar 5, 2011 at 9:21 PM, Simon Riggs <simon@2ndquadrant.com> wrote:
> I've added code to shmqueue.c to allow this.
>
> New version pushed.

New comments;

It looks odd to report the sync_state of walsender in BACKUP
state as ASYNC.

+SyncRepCleanupAtProcExit(int code, Datum arg)
+{
+    if (WaitingForSyncRep && !SHMQueueIsDetached(&(MyProc->syncrep_links)))
+    {
+        LWLockAcquire(SyncRepLock, LW_EXCLUSIVE);
+        SHMQueueDelete(&(MyProc->syncrep_links));
+        LWLockRelease(SyncRepLock);
+    }
+
+    if (MyProc != NULL)
+        DisownLatch(&MyProc->waitLatch);

Can MyProc really be NULL here? If yes, "MyProc != NULL" should be
checked before seeing MyProc->syncrep_links.

Even though postmaster dies, the waiting backend keeps waiting until
the timeout expires. Instead, the backends should periodically check
whether postmaster is alive, and then they should exit immediately
if it's not alive, as well as other process does? If the timeout is
disabled, such backends would get stuck infinitely.

Though I commented about the issue related to shutdown, that was
pointless. So change of ProcessInterrupts is not required unless we
find the need again. Sorry for the noise..

Regards,

-- 
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


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

Предыдущее
От: Andy Colson
Дата:
Сообщение: Re: Alpha4 release blockers (was Re: wrapping up this CommitFest)
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Sync Rep v19