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

From Michael Paquier
Subject Re: calculating an aspect of shared buffer state from a background worker
Date
Msg-id CAB7nPqT9QvyFyRs3YhQow7sPteY3c0pjpeyUdHMei41HzR_NKA@mail.gmail.com
Whole thread Raw
In response to calculating an aspect of shared buffer state from a background worker  (Robert Berry <berrydigital@gmail.com>)
List pgsql-hackers
On Mon, Mar 10, 2014 at 2:09 PM, Robert Berry <berrydigital@gmail.com> wrote:
> Is there a way to get access to the StrategyControl pointer in the context
> of a background worker?
StrategyControl is inherent to freelist.c and has no external
declaration so you could not have it even if you the
BGWORKER_SHMEM_ACCESS flag. In order to calculate that, an idea could
be to go through the array of BufferDescriptors and then get the
information necessary. Locks are necessary when doing that if you want
to get a consistent picture of the buffers. Perhaps more experienced
people have better ideas though...
Regards,
-- 
Michael



pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: UNION ALL on partitioned tables won't use indices.
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Get more from indices.