Lockless pg_buffercache - Mailing list pgsql-general

From Markus Bertheau
Subject Lockless pg_buffercache
Date
Msg-id 684362e10802092034rebc1e67n910f5ddb8816a31d@mail.gmail.com
Whole thread Raw
Responses Re: Lockless pg_buffercache
Re: Lockless pg_buffercache
List pgsql-general
Hi,

I want to use the pg_buffercache contrib module for monitoring our
server. It takes a lock on all buffers and then on each buffer header
in order to get a consistent picture of the buffers. I would be
running the function provided by the module once every 5 minutes.

I'm worrying about the performance hit of that - a comment in the code
says it's horrible for concurrency. Additionally, as I don't use this
for debugging, but just for monitoring, I don't need a 100% consistent
picture, just rough numbers how much of the buffer cache is used for
what relation.

Does removing all locking as in the attached patch have any negative
impact other than the non-consistency of the results?

Thanks

Markus

Attachment

pgsql-general by date:

Previous
From: "Dean Gibson (DB Administrator)"
Date:
Subject: Re: Where is the system-wide psqlrc on RHEL4?
Next
From: "Gurjeet Singh"
Date:
Subject: Re: pg_restore seems slow