[PATCHES] Fix spinlock usage in UnpinBuffer()

2005-12-28 Thread Qingqing Zhou
There is no LWLock protecting the spinlock in UnpinBuffer(), so we need do so ourselves. I also checked other NoHoldOff spinlock, seems they are ok. Regards, Qingqing Index: bufmgr.c === RCS file:

Re: [PATCHES] Fix spinlock usage in UnpinBuffer()

2005-12-28 Thread Tom Lane
Qingqing Zhou [EMAIL PROTECTED] 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.

Re: [PATCHES] Fix spinlock usage in UnpinBuffer()

2005-12-28 Thread Qingqing Zhou
On Wed, 28 Dec 2005, Tom Lane wrote: Because the code uses _NoHoldoff, there won't be any check of InterruptPending in that segment of code. I guess the danger I claimed may not really happen because of the ImmediateInterruptOK variable. Since it is almost always false (except reading inputs

Re: [PATCHES] Fix spinlock usage in UnpinBuffer()

2005-12-28 Thread Tom Lane
So can you drop several lines on last post in list? [ looks at code some more... ] Actually, I think this code thinks that RESUME_INTERRUPTS() will do a CHECK_FOR_INTERRUPTS() if the count drops to zero. Which it does not. (Perhaps it did at one time --- I don't recall for sure --- but it

[PATCHES] Extra space character in PL/pgSQL documentation

2005-12-28 Thread Michael Fuhr
Remove a space that incorrectly precedes a comma in the PL/pgSQL documentation. -- Michael Fuhr Index: doc/src/sgml/plpgsql.sgml === RCS file: /projects/cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v retrieving revision 1.82 diff -c

Re: [PATCHES] Fix spinlock usage in UnpinBuffer()

2005-12-28 Thread Qingqing Zhou
Tom Lane [EMAIL PROTECTED] wrote So I'm thinking the right answer is to make all the spinlock macros be the equivalent of the NoHoldoff case. It's reasonable for LWLockAcquire to do a HOLD_INTERRUPTS, but I don't see the justification for doing it at the spinlock level. I agree on this.

Re: [PATCHES] Fix spinlock usage in UnpinBuffer()

2005-12-28 Thread Tom Lane
Qingqing Zhou [EMAIL PROTECTED] writes: I agree on this. But before changing it, we need to inspect those spinlocks one by one to making sure two things (1) if there is out-of-line-call, make sure no CHECK_FOR_INTERRUPTS(); (2) ImmediateInterruptsOK is false (99% sure now). I'm sure of

Re: [PATCHES] Extra space character in PL/pgSQL documentation

2005-12-28 Thread Bruce Momjian
Patch applied. Thanks. --- Michael Fuhr wrote: Remove a space that incorrectly precedes a comma in the PL/pgSQL documentation. -- Michael Fuhr [ Attachment, skipping... ] ---(end of

Re: [PATCHES] Fix spinlock usage in UnpinBuffer()

2005-12-28 Thread Qingqing Zhou
On Wed, 28 Dec 2005, Tom Lane wrote: Qingqing Zhou [EMAIL PROTECTED] writes: I agree on this. But before changing it, we need to inspect those spinlocks one by one to making sure two things (1) if there is out-of-line-call, make sure no CHECK_FOR_INTERRUPTS(); (2) ImmediateInterruptsOK is