From: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)2ndquadrant(dot)com> |
Cc: | Clemens Eisserer <linuxhippy(at)gmail(dot)com>, Pg Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: BUG #9161: wal_writer_delay is limited to 10s |
Date: | 2014-02-17 21:48:34 |
Message-ID: | CAMkU=1xVA5=Ub5Ktx1DYb+oHn-afo=Oae7o+oMr2HYT9aDPHyQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On Fri, Feb 14, 2014 at 2:50 PM, Andres Freund <andres(at)2ndquadrant(dot)com>wrote:
> On 2014-02-14 23:03:44 +0100, Clemens Eisserer wrote:
> > Hi Tom,
> >
> > Thanks for taking a look at my bug report.
> >
> > > But if you're generating WAL, it's going to get written anyway
> > > whenever a transaction commits.
> >
> > As far as I understood, this is only the case with
> > synchronous_commit=on, which is the reason why I turned synchrous
> > commit off.
>
> The WAL writer will be woken up anyway if a transaction commits
> (c.f. XLogSetAsyncXactLSN()).
>
That only happens if an 8 KB boundary has been crossed. Depending on how
big the records are that he is inserting, you can fit a lot of them in 8
KB. If the records are small, or the table us unlogged so only commit
messages get logged, then you could go many multiples of 10s without
triggering a wake up due to crossing an 8 KB boundary.
So if we did change the upper limit (or if Clemens adds 2 zeros to guc.c
and compiles his own) he should be able to get quite a bit of mileage out
of it.
Why do we awaken it for every 8KB boundary? I thought there was code to
wake it when wal_buffers was 1/3 full, but I don't see that code anymore.
Cheers,
Jeff
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-02-17 21:53:29 | Re: BUG #9161: wal_writer_delay is limited to 10s |
Previous Message | Tom Lane | 2014-02-17 21:39:44 | Re: BUG #9161: wal_writer_delay is limited to 10s |