From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Peter Geoghegan <peter(at)2ndquadrant(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Uh, I change my mind about commit_delay + commit_siblings (sort of) |
Date: | 2012-05-30 08:36:49 |
Message-ID: | CA+U5nM+NpS7m4AFXFXusGuvyD=+DmmgVGBM0LTD9kpjjVD7+JA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 29 May 2012 17:58, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, May 29, 2012 at 12:47 PM, Peter Geoghegan <peter(at)2ndquadrant(dot)com> wrote:
>> Why do you think that doing this for all XLogFlush() callsites might
>> be problematic?
>
> Well, consider the one in the background writer, for example. That's
> just a periodic flush, so I see no benefit in having it acquire the
> lock and then wait some more. It already did wait. And what about
> the case where we're flushing while holding WALInsertLock because the
> buffer's full? Clearly waiting is useless in that case - nobody can
> join the group commit for exactly the same reason that we're doing the
> flush in the first place: no buffer space.
When I read this the first time, I was in full agreement.
On closer inspection neither point is valid, though both points were
worth considering.
> Well, consider the one in the background writer, for example. That's
> just a periodic flush, so I see no benefit in having it acquire the
> lock and then wait some more. It already did wait.
We use XLogBackgroundFlush() not XLogFlush() from background processes.
> And what about
> the case where we're flushing while holding WALInsertLock because the
> buffer's full? Clearly waiting is useless in that case - nobody can
> join the group commit for exactly the same reason that we're doing the
> flush in the first place: no buffer space.
We don't flush WAL in that case, we just write it.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2012-05-30 08:49:58 | Re: hash index concurrency |
Previous Message | Tatsuo Ishii | 2012-05-30 04:58:10 | Re: pg_dump error on git head |