Re: pg_receivexlog add synchronous mode - Mailing list pgsql-hackers

From
Subject Re: pg_receivexlog add synchronous mode
Date
Msg-id A9C510524E235E44AE909CD4027AE196BAAA06D7E2@MBX-MSG-SV03.msg.nttdata.co.jp
Whole thread Raw
In response to Re: pg_receivexlog add synchronous mode  (<furuyao@pm.nttdata.co.jp>)
Responses Re: pg_receivexlog add synchronous mode
List pgsql-hackers
> -----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

Attachment

pgsql-hackers by date:

Previous
From: Gurjeet Singh
Date:
Subject: Re: Proposing pg_hibernate
Next
From: Pavel Stehule
Date:
Subject: Re: wrapping in extended mode doesn't work well with default pager