> I think the problem is that BufferSync unconditionally does PinBuffer
> on each buffer, and holds the pin during intervals where it's released
> BufMgrLock, even if there's not really anything for it to do on that
> buffer. If someone else is running FlushRelationBuffers then it's
> possible for that routine to see a nonzero pin count when it looks.
>
> Vadim, what do you think about how to change this? I think this is
> BufferSync's fault not FlushRelationBuffers's ...
I'm looking there right now...
Vadim