Fix longstanding race condition in transaction log management: there was a

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

Commit: 237afd453fe3a68d2dde4c940ad4a40aed8884d3
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2005-11-03T00:23:57Z
Releases: 7.3.12
Fix longstanding race condition in transaction log management: there was a
very narrow window in which SimpleLruReadPage or SimpleLruWritePage could
think that I/O was needed when it wasn't (and indeed the buffer had already
been assigned to another page).  This would result in an Assert failure if
Asserts were enabled, and probably in silent data corruption if not.
Reported independently by Jim Nasby and Robert Creager.

I intend a more extensive fix when 8.2 development starts, but this is a
reasonably low-impact patch for the existing branches.

Files

PathChange+/−
src/backend/access/transam/clog.c modified +51 −32