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

Re: Fix spinlock usage in UnpinBuffer()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Fix spinlock usage in UnpinBuffer()
Date: 2005-12-28 19:56:29
Message-ID: 21361.1135799789@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
Qingqing Zhou <zhouqq(at)cs(dot)toronto(dot)edu> writes:
> There is no LWLock protecting the spinlock in UnpinBuffer(),

I don't believe this is necessary, and if it is necessary the patch
is wrong anyway.  Because the code uses _NoHoldoff, there won't be
any check of InterruptPending in that segment of code.  Furthermore,
any callers who don't have their own interrupt holdoff in force are
probably broken --- it's unlikely that the state of bufmgr is globally
correct if the caller of UnpinBuffer loses control.

Exactly which path of control are you worried about?

			regards, tom lane

In response to

Responses

pgsql-patches by date

Next:From: Qingqing ZhouDate: 2005-12-29 00:04:28
Subject: Re: Fix spinlock usage in UnpinBuffer()
Previous:From: Qingqing ZhouDate: 2005-12-28 19:09:28
Subject: Fix spinlock usage in UnpinBuffer()

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