Re: A WalSnd issue related to state WALSNDSTATE_STOPPING

2018-11-28 Thread Michael Paquier
On Tue, Nov 27, 2018 at 11:40:25AM +0900, Michael Paquier wrote: > Thanks Paul for double-checking. I'll come back to this patch in two > days, look at it again and commit it if there are no objections from > others. Committed and back-patched down to 9.4. Thanks Paul for the report! -- Michael

Re: A WalSnd issue related to state WALSNDSTATE_STOPPING

2018-11-26 Thread Michael Paquier
On Tue, Nov 27, 2018 at 10:07:04AM +0800, Paul Guo wrote: > Agree. Your code change is safer. Thanks Paul for double-checking. I'll come back to this patch in two days, look at it again and commit it if there are no objections from others. -- Michael signature.asc Description: PGP signature

Re: A WalSnd issue related to state WALSNDSTATE_STOPPING

2018-11-26 Thread Paul Guo
> > On Thu, Nov 22, 2018 at 06:31:04PM +0800, Paul Guo wrote: > > Yes, please see the attached patch. > > Thanks, I have reviewed your patch, and could not resist to change > SyncRepReleaseWaiters() on top of the rest with a comment to not be > confused about the WAL sender states allowed to releas

Re: A WalSnd issue related to state WALSNDSTATE_STOPPING

2018-11-26 Thread Michael Paquier
On Thu, Nov 22, 2018 at 06:31:04PM +0800, Paul Guo wrote: > Yes, please see the attached patch. Thanks, I have reviewed your patch, and could not resist to change SyncRepReleaseWaiters() on top of the rest with a comment to not be confused about the WAL sender states allowed to release waiters. T

Re: A WalSnd issue related to state WALSNDSTATE_STOPPING

2018-11-22 Thread Paul Guo
On Thu, Nov 22, 2018 at 1:29 PM Michael Paquier wrote: > On Wed, Nov 21, 2018 at 04:09:41PM +0900, Michael Paquier wrote: > > The checkpointer initializes a shutdown checkpoint where it tells to all > > the WAL senders to stop once all the children processes are gone, so it > > seems to me that t

Re: A WalSnd issue related to state WALSNDSTATE_STOPPING

2018-11-21 Thread Michael Paquier
On Wed, Nov 21, 2018 at 04:09:41PM +0900, Michael Paquier wrote: > The checkpointer initializes a shutdown checkpoint where it tells to all > the WAL senders to stop once all the children processes are gone, so it > seems to me that there is little point in processing > SyncRepReleaseWaiters() when

Re: A WalSnd issue related to state WALSNDSTATE_STOPPING

2018-11-20 Thread Michael Paquier
On Wed, Nov 21, 2018 at 12:54:30PM +0800, Paul Guo wrote: > The panic reason is that since there is just one wal sender and > WalSndCtl->walsnds[0].state is WALSNDSTATE_STOPPING so syncWalSnd will be > NULL and that causes assert failure. Latest postgresql code removes the > Assert code but the rel

A WalSnd issue related to state WALSNDSTATE_STOPPING

2018-11-20 Thread Paul Guo
Hello, Recently I encountered a panic (assert failure) on a cassert enabled build of Greenplum database (an MPP database based on postgres). The based postgresql version is 9.4 stable (9.4.19). The panic is not complex. Please see below for more details. This issue seems to be a bug in postgresql