Re: WALWriteLock contention

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WALWriteLock contention
Date: 2015-05-15 17:09:03
Message-ID: 4841.1431709743@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

> 2. I don't really understand why WALWriteLock is set up to prohibit
> two backends from flushing WAL at the same time. That seems
> unnecessary.

Hm, perhaps so.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Volker Aßmann 2015-05-15 17:15:19 Re: Disabling trust/ident authentication configure option
Previous Message Robert Haas 2015-05-15 17:03:59 Re: Changes to backup.sgml