Re: pg_receivexlog add synchronous mode

From: <furuyao(at)pm(dot)nttdata(dot)co(dot)jp>
To: <andres(at)2ndquadrant(dot)com>
Cc: <pgsql-hackers(at)postgresql(dot)org>, <teranishih(at)nttdata(dot)co(dot)jp>
Subject: Re: pg_receivexlog add synchronous mode
Date: 2014-06-06 11:05:27
Message-ID: A9C510524E235E44AE909CD4027AE196BAAA06D7E2@MBX-MSG-SV03.msg.nttdata.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
pg_receivexlog-add-synchronous-mode-v2.patch application/octet-stream 9.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2014-06-06 11:10:22 Re: wrapping in extended mode doesn't work well with default pager
Previous Message Gurjeet Singh 2014-06-06 11:04:29 Re: Proposing pg_hibernate