Bruce Momjian <[EMAIL PROTECTED]> writes:
>> Is there a race condition in ReadBufferInternal() ?
No.
As the comments in bufmgr.c point out, this is not bufmgr.c's problem:
* ReadBuffer -- returns a buffer containing the requested
* block of the requested relation. If the blknum
* requested is P_NEW, extend the relation file and
* allocate a new block. (Caller is responsible for
* ensuring that only one backend tries to extend a
* relation at the same time!)
In practice, the necessary locking is done by hio.c in the case of
heap relations:
* Note that we use LockPage(rel, 0) to lock relation for extension.
and in the case of index relations the various index AMs have their own
approaches.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster