Re: [HACKERS] fix oversight converting buf_id to Buffer

2015-08-12 Thread Andres Freund
Hi, On 2015-08-11 01:15:37 +0200, Andres Freund wrote: I'm too tired right now to look at this, but it generally looked sane. Pushed your fix to master and 9.5, with two very minor changes: 1) I moved the BufferDescriptorGetBuffer() call in PinBuffer_Locked() to after the spinlock release.

Re: [HACKERS] fix oversight converting buf_id to Buffer

2015-08-12 Thread Qingqing Zhou
All look good to me, Thank you, Qingqing On Wed, Aug 12, 2015 at 8:37 AM, Andres Freund and...@anarazel.de wrote: Hi, On 2015-08-11 01:15:37 +0200, Andres Freund wrote: I'm too tired right now to look at this, but it generally looked sane. Pushed your fix to master and 9.5, with two very

[HACKERS] fix oversight converting buf_id to Buffer

2015-08-10 Thread Qingqing Zhou
Attached patch fixes oversights converting buf_id to Buffer in PrintBufferDescs() and InvalidateBuffer(). Especially for the latter, the reason we haven't seen any reports of the issue might be that it needs certain concurrent conditions to be true. Along the line, it also changes all direct

Re: [HACKERS] fix oversight converting buf_id to Buffer

2015-08-10 Thread Andres Freund
Hi, That's a very nice catch! Did you trigger the error or just found it when reading the code? On 2015-08-10 12:12:01 -0700, Qingqing Zhou wrote: Attached patch fixes oversights converting buf_id to Buffer in PrintBufferDescs() and InvalidateBuffer(). Especially for the latter, the reason we

Re: [HACKERS] fix oversight converting buf_id to Buffer

2015-08-10 Thread Qingqing Zhou
On Mon, Aug 10, 2015 at 4:15 PM, Andres Freund and...@anarazel.de wrote: That's a very nice catch! Did you trigger the error or just found it when reading the code? My fellow colleagues hit the issue during some stress: I am not clear the exact repro but from the failed assertion, the cause