Re: calculating an aspect of shared buffer state from a background worker

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Robert Berry <berrydigital(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: calculating an aspect of shared buffer state from a background worker
Date: 2014-03-10 06:45:18
Message-ID: CAB7nPqT9QvyFyRs3YhQow7sPteY3c0pjpeyUdHMei41HzR_NKA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 10, 2014 at 2:09 PM, Robert Berry <berrydigital(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2014-03-10 07:21:39 Re: Get more from indices.
Previous Message Kyotaro HORIGUCHI 2014-03-10 06:10:43 Re: UNION ALL on partitioned tables won't use indices.