calculating an aspect of shared buffer state from a background worker - Mailing list pgsql-hackers

From Robert Berry
Subject calculating an aspect of shared buffer state from a background worker
Date
Msg-id CAM=RetE0BUD_oySSOY45hovw1wTZqAm3xWct=Pw=ejJN0WV6-w@mail.gmail.com
Whole thread Raw
Responses Re: calculating an aspect of shared buffer state from a background worker
Re: calculating an aspect of shared buffer state from a background worker
List 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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: review: psql command copy count tag
Next
From: Rajeev rastogi
Date:
Subject: Re: [review] PostgreSQL Service on Windows does not start if data directory given is relative path