Skip site navigation (1) Skip section navigation (2)

pgsql/src include/access/hio.h backend/access/ ...

From: Tom Lane <tgl(at)hub(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql/src include/access/hio.h backend/access/ ...
Date: 2001-05-16 22:35:13
Message-ID: 200105162235.f4GMZDv44307@hub.org (view raw or flat)
Thread:
Lists: pgsql-committers
CVSROOT:	/home/projects/pgsql/cvsroot
Module name:	pgsql
Changes by:	tgl(at)hub(dot)org	01/05/16 18:35:13

Modified files:
	src/include/access: hio.h 
	src/backend/access/heap: hio.c heapam.c 

Log message:
	Repair race condition introduced into heap_update() in 7.1 ---
	PageGetFreeSpace() was being called while not holding the buffer lock, which
	not only could yield a garbage answer, but even if it's the right answer there
	might be less space available after we reacquire the buffer lock.
	
	Also repair potential deadlock introduced by my recent performance improvement
	in RelationGetBufferForTuple(): it was possible for two heap_updates to try to
	lock two buffers in opposite orders.  The fix creates a global rule that
	buffers of a single heap relation should be locked in decreasing block number
	order.  Currently, this only applies to heap_update; VACUUM can get away with
	ignoring the rule since it holds exclusive lock on the whole relation anyway.
	However, if we try to implement a VACUUM that can run in parallel with other
	transactions, VACUUM will also have to obey the lock order rule.


pgsql-committers by date

Next:From: Bruce Momjian - CVSDate: 2001-05-16 22:36:04
Subject: pgsql/src backend/catalog/index.c interfaces/o ...
Previous:From: Bruce Momjian - CVSDate: 2001-05-16 20:18:25
Subject: pgsql/doc TODO

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group