On Wed, 2021-03-17 at 10:14 +0530, vinay kumar wrote:
> Need some understanding regarding recovery conflict due to buffer pin.
>
> We see "User was holding shared buffer pin for too long" .
>
> I understand that this can be due to holding lock to update content of a db block or page.
>
> 1> Is the lock held on a buffer page or page at disk level?
A buffer page. And it is not a lock, it is a pin
> 2> Is there any serialization present to maintain the locking mechanism?
I don't quite understand - what you observe *is* the serialization
of access.
See this blog for some details:
https://www.cybertec-postgresql.com/en/streaming-replication-conflicts-in-postgresql/
Yours,
Laurenz Albe