calculating an aspect of shared buffer state from a background worker

From: Robert Berry <berrydigital(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: calculating an aspect of shared buffer state from a background worker
Date: 2014-03-10 05:09:15
Message-ID: CAM=RetE0BUD_oySSOY45hovw1wTZqAm3xWct=Pw=ejJN0WV6-w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Dear Hackers --

I'm looking at doing a calculation to determine the number of free buffers
available. A n example ratio that is based on some data structures in
freelist.c as follows:

(StrategyControl->lastFreeBuffer - StrategyControl->firstFreeBuffer) /
(double) NBuffers

Is there a way to get access to the StrategyControl pointer in the context
of a background worker?

Thanks,
Robert

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-03-10 05:24:10 Re: issue log message to suggest VACUUM FULL if a table is nearly empty
Previous Message Rajeev rastogi 2014-03-10 05:08:30 Re: [review] PostgreSQL Service on Windows does not start if data directory given is relative path