From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
Cc: | Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: 001_rep_changes.pl stalls |
Date: | 2020-04-20 07:02:15 |
Message-ID: | 20200420070215.GA1395671@rfd.leadboat.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Apr 20, 2020 at 02:30:08PM +0900, Fujii Masao wrote:
> + * Block if we have unsent data. XXX For logical replication, let
> + * WalSndWaitForWal(), handle any other blocking; idle receivers need
> + * its additional actions. For physical replication, also block if
> + * caught up; its send_data does not block.
>
> It might be better to s/WalSndWaitForWal()/send_data()? Because not only
> WalSndWaitForWal() but also WalSndWriteData() seems to handle the blocking.
> WalSndWriteData() is called also under send_data, i.e., XLogSendLogical().
Thanks for reviewing. WalSndWriteData() blocks when we have unsent data,
which is the same cause for blocking in WalSndLoop(). Since the comment you
quote says we let WalSndWaitForWal() "handle any other blocking", I don't
think your proposed change makes it more correct. Also, if someone wants to
refactor this, the place to look is WalSndWaitForWal(), not any other part of
send_data().
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2020-04-20 07:02:31 | Re: [BUG] non archived WAL removed during production crash recovery |
Previous Message | Thomas Munro | 2020-04-20 06:58:34 | Re: fixing old_snapshot_threshold's time->xid mapping |