On Wed, Jun 26, 2013 at 11:27 PM, Andres Freund <andres@2ndquadrant.com> wrote:
> Why not do this from a function/background worker in the backend where
> you can go via the buffer manager to avoid torn pages et al. If you use
> a buffer strategy the cache poisoning et al should be controlleable.
I had considered that, but thought it might be a little bit
aggressive, even with a strategy of BAS_BULKREAD. Maybe the kludge I
have in mind might not end up being that bad in practice, and would
certainly perform better than an approach that used the buffer
manager. But then, going through shared_buffers could be worth the
overhead, if only for the peace of mind of not relying on something
that is subtly broken.
--
Peter Geoghegan