Re: [Bug Fix]standby may crash when switching-over in certain special cases

2024-12-27 Thread px shi
Hi, I inserted the following code in walsender.c:2509(v15.8) to reproduce the issue. { WalSnd *walsnd = MyWalSnd; SpinLockAcquire(&walsnd->mutex); if (walsnd->flush % wal_segment_size == 0 && walsnd->sentPtr == walsnd->flush && walsnd->flush > wal_segment_size)

Re: [Bug Fix]standby may crash when switching-over in certain special cases

2024-10-10 Thread px shi
> > Although I've not tested it because I don't have good way to reproduce > the problem I use GDB to reproduce the issue by killing the primary node with kill -9 when the standby’s flushedlsn was at the begining of a WAL segment. However, this causes to request the primary to stream data fro

Re: [Bug Fix]standby may crash when switching-over in certain special cases

2024-10-08 Thread Yugo NAGATA
On Mon, 30 Sep 2024 15:14:54 +0800 px shi wrote: > Thanks for responding. > > > > It is odd that the standby server crashes when > > replication fails because the standby would keep retrying to get the > > next record even in such case. > > > As I mentioned earlier, when replication fails,

Re: [Bug Fix]standby may crash when switching-over in certain special cases

2024-09-30 Thread px shi
Thanks for responding. > It is odd that the standby server crashes when replication fails because the standby would keep retrying to get the next record even in such case. As I mentioned earlier, when replication fails, it retries to establish streaming replication. At this point, the value

Re: [Bug Fix]standby may crash when switching-over in certain special cases

2024-09-29 Thread Yugo NAGATA
On Wed, 21 Aug 2024 09:11:03 +0800 px shi wrote: > Yugo Nagata 于2024年8月21日周三 00:49写道: > > > > > > > > Is s1 a cascading standby of s2? If otherwise s1 and s2 is the standbys > > of > > > the primary server respectively, it is not surprising that s2 has > > progressed > > > far than s1 when the

Re: [Bug Fix]standby may crash when switching-over in certain special cases

2024-08-20 Thread px shi
Yugo Nagata 于2024年8月21日周三 00:49写道: > > > > Is s1 a cascading standby of s2? If otherwise s1 and s2 is the standbys > of > > the primary server respectively, it is not surprising that s2 has > progressed > > far than s1 when the primary fails. I believe that this is the case you > should > > use p

Re: [Bug Fix]standby may crash when switching-over in certain special cases

2024-08-20 Thread Yugo Nagata
On Mon, 19 Aug 2024 16:43:09 +0800 px shi wrote: > Hi, hackers, > > I've recently encountered an issue where a standby crashes when > reconnecting to a new primary after a switchover under certain conditions. > Here's a procedure of the crash scenario: > > > 1) We have three instances: one pri

[Bug Fix]standby may crash when switching-over in certain special cases

2024-08-19 Thread px shi
Hi, hackers, I've recently encountered an issue where a standby crashes when reconnecting to a new primary after a switchover under certain conditions. Here's a procedure of the crash scenario: 1) We have three instances: one primary and two standbys (s1 and s2, both using streaming replication)