pgsql: Fix incorrect initialization of ProcGlobal->startupBufferPinWait

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix incorrect initialization of ProcGlobal->startupBufferPinWait
Date: 2011-08-02 17:24:23
Message-ID: E1QoIhb-0007Ux-Qt@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix incorrect initialization of ProcGlobal->startupBufferPinWaitBufId.

It was initialized in the wrong place and to the wrong value. With bad
luck this could result in incorrect query-cancellation failures in hot
standby sessions, should a HS backend be holding pin on buffer number 1
while trying to acquire a lock.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/2e53bd5517431637e495c7614761e5aae46b4eba

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c | 3 ++-
src/backend/storage/lmgr/proc.c | 10 ++++------
src/include/storage/proc.h | 2 +-
3 files changed, 7 insertions(+), 8 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Simon Riggs 2011-08-02 19:16:06 Re: pgsql: Fix incorrect initialization of ProcGlobal->startupBufferPinWait
Previous Message Heikki Linnakangas 2011-08-02 09:11:21 pgsql: Avoid integer overflow when LIMIT + OFFSET >= 2^63.