> -----Original Message-----
> > > Flush is not performed every time write, it is performed
> > > collectively like walrecever.
> >
> > I only glanced at this, but afaics you're only flushing at the end
> > every WAL segment. That will result in absolutely horrible performance,
> right?
> > Walreceiver does flush more frequently than that. It basically syncs
> > every chunk of received WAL...
>
> IMO the completion of the write loop was completion of received WAL.
> And Walreceiver same.
>
> I confirm it about the flush position.
As you say,Walreceiver does flush more frequently than that.
However, it seems difficult to apply as same way.
So, I have tried a different approach.
1. select () time-out 100msec setting.
2. flush check is time-out of the select ().
3. wirte() only when flush.
I think this is what cause the problem, but I don't have some good idea to solve it.
Can someone please advise me?
Regards,
--
Furuya Osamu