WALInsertLock tuning

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: WALInsertLock tuning
Date: 2011-06-06 16:15:28
Message-ID: BANLkTingB35r5Z3TDD5B2sajSbmB3sgAWg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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, and replication works
perfectly well without that (as a test of recovery logic). It is
unnecessary because we already allow non-zeroed parts of WAL files,
and provide a mechanism to detect stale data.

The following trivial patch removes the page zeroing, which reduces
the lock duration.

Comments?

--
 Simon Riggs                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
walinsertlock_avoid_zero.v1.patch application/octet-stream 1.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2011-06-06 16:17:10 Re: Postmaster holding unlinked files for pg_largeobject table
Previous Message Kevin Grittner 2011-06-06 16:14:54 Re: reducing the overhead of frequent table locks - now, with WIP patch