Re: WALInsertLock tuning

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Simon Riggs <simon@2ndQuadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-06-06T16:47:44Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Introduce compact WAL record for the common case of commit (non-DDL).

Simon Riggs <simon@2ndQuadrant.com> writes:
> In earlier discussions of how to improve WALInsertLock contention, it
> was observed that we must zero each new page before we advance the WAL
> insertion point.
> http://postgresql.1045698.n5.nabble.com/Reworking-WAL-locking-td1983647.html

> IMHO the page zeroing is completely unnecessary,

I don't believe it's "completely unnecessary".  It does in fact offer
additional protection against mistakenly taking stale data as valid.
You could maybe argue that the degree of safety increase isn't
sufficient to warrant the cost of zeroing the page, but you've not
offered any quantification of either the risk or the cost savings.

			regards, tom lane