Re: Proposal : For Auto-Prewarm. - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Proposal : For Auto-Prewarm.
Date
Msg-id 20161028074029.ohq6lv5nw4naa777@alap3.anarazel.de
Whole thread Raw
In response to Re: Proposal : For Auto-Prewarm.  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Proposal : For Auto-Prewarm.  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2016-10-28 12:59:58 +0530, Amit Kapila wrote:
> On Fri, Oct 28, 2016 at 1:45 AM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
> > On 10/27/16 6:39 AM, Mithun Cy wrote:
> >>
> >> # pg_autoprewarm.
> >
> >
> > IMO it would be better to add this functionality to pg_prewarm instead of
> > creating another contrib module.
> >
> 
> There is not much common functionality between the two.

I don't really agree. For me manual and automated prewarming are pretty
closely related. Sure they have their independent usages, and not too
much code might be shared. But grouping them in the same extension seems
to make sense, it's confusing to have closely related but independent
extensions.

> One point that seems to be worth discussing is when should the buffer
> information be dumped to a file?  Shall we dump at each checkpoint or
> at regular intervals via auto prewarm worker or at some other time?

Should probably be at some regular interval - not sure if checkpoints
are the best time (or if it's even realistic to tie a bgworker to
checkpoints), since checkpoints have a significant impact on the state
of shared_buffers.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Proposal : For Auto-Prewarm.
Next
From: Amit Langote
Date:
Subject: Re: Declarative partitioning - another take