From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Sync Rep v19 |
Date: | 2011-03-05 16:56:19 |
Message-ID: | 1299344179.10703.13340.camel@ebony |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 2011-03-06 at 00:42 +0900, Fujii Masao wrote:
> On Sat, Mar 5, 2011 at 9:21 PM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> > I've added code to shmqueue.c to allow this.
> >
> > New version pushed.
>
> New comments;
None of the requested changes are in v21, as yet.
> It looks odd to report the sync_state of walsender in BACKUP
> state as ASYNC.
Cool.
> +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.
OK
> 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.
Will wake them every 60 seconds
> 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..
Yep, all gone now.
--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2011-03-05 16:58:31 | Re: Sync Rep v19 |
Previous Message | Simon Riggs | 2011-03-05 16:53:20 | Re: Sync Rep v19 |