Re: WALWriteLock contention

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WALWriteLock contention
Date: 2015-05-15 18:23:53
Message-ID: CA+TgmoZi1DkkYAMpbtwi0OSWFpxx6tU8YOtJYfcMfuvg-31QEA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, May 15, 2015 at 1:09 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> WALWriteLock contention is measurable on some workloads. In studying
>> the problem briefly, a couple of questions emerged:
>
>> 1. Doesn't it suck to rewrite an entire 8kB block every time, instead
>> of only the new bytes (and maybe a few bytes following that to spoil
>> any old data that might be there)?
>
> It does, but it's not clear how to avoid torn-write conditions without
> that.

Can you elaborate? I don't understand how repeatedly overwriting the
same bytes with themselves accomplishes anything at all.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-05-15 18:30:02 Re: PATCH: adaptive ndistinct estimator v4
Previous Message Simon Riggs 2015-05-15 18:19:36 Re: ERROR: cannot GetMultiXactIdMembers() during recovery