Re: 001_rep_changes.pl stalls
Kyotaro Horiguchi <horikyota.ntt@gmail.com>
From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: masao.fujii@oss.nttdata.com
Cc: noah@leadboat.com, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org
Date: 2020-04-20T07:24:06Z
Lists: pgsql-hackers
At Mon, 20 Apr 2020 14:30:08 +0900, Fujii Masao <masao.fujii@oss.nttdata.com> wrote in > > > On 2020/04/18 16:01, Noah Misch wrote: > > On Sat, Apr 18, 2020 at 12:29:58AM +0900, Fujii Masao wrote: > >>> 4. Keep the WalSndLoop() wait, but condition it on !logical. This is > >>> the > >>> minimal fix, but it crudely punches through the abstraction between > >>> WalSndLoop() and its WalSndSendDataCallback. > >> > >> (4) also looks good because it's simple, if we can redesign those > >> functions in good shape. > > Let's do that. I'm attaching the replacement implementation and the > > revert of > > v1. > > Thanks for the patch! Though referencing XLogSendLogical inside > WalSndLoop() > might be a bit ugly,, I'm fine with this change because it's simple > and easier > to understand. I thought that if we do this, read_data returns boolean that indiates whether wait for latch or incoming packet, or returns a wake event mask. regards. -- Kyotaro Horiguchi NTT Open Source Software Center
Commits
-
In caught-up logical walsender, sleep only in WalSndWaitForWal().
- f246ea3b2a5e 13.0 landed
-
Revert "When WalSndCaughtUp, sleep only in WalSndWaitForWal()."
- 72a3dc321d76 13.0 landed
-
Add a wait_for_catchup() before immediate stop of a test master.
- b33ac1a65884 11.8 landed
- ab7699e86c16 10.13 landed
- 30afff385dd2 12.3 landed
- d60cfb6bf2b4 13.0 landed
-
When WalSndCaughtUp, sleep only in WalSndWaitForWal().
- 421685812290 13.0 landed