WALInsertLock tuning
Simon Riggs <simon@2ndquadrant.com>
From: Simon Riggs <simon@2ndQuadrant.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-06-06T16:15:28Z
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 →
-
Introduce compact WAL record for the common case of commit (non-DDL).
- 465883b0a2b4 9.2.0 cited
Attachments
- walinsertlock_avoid_zero.v1.patch (application/octet-stream) patch v1
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