Re: Proposal : For Auto-Prewarm.

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, mithun cy <mithun(dot)cy(at)enterprisedb(dot)com>
Subject: Re: Proposal : For Auto-Prewarm.
Date: 2017-01-25 13:02:16
Message-ID: CA+Tgmobe_dO5q2MJTAHGDQsa=q9GNLmSFD2ku6ueP2Ty9bCWww@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 23, 2017 at 6:37 PM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
> I'm not sure the default GUC setting of 0 makes sense. If you've loaded the module, presumably you want it to be running. I think it'd be nice if the GUC had a -1 setting that meant to use checkpoint_timeout.

Actually, I think we need to use -1 to mean "don't run the worker at
all". 0 means "run the worker, but don't do timed dumps". >0 means
"run the worker, and dump at that interval".

I have to admit that when I was first thinking about this feature, my
initial thought was "hey, let's dump once per checkpoint_timeout".
But I think that Mithun's approach is better. There's no intrinsic
connection between this and checkpointing, and letting the user pick
the interval is a lot more flexible. We could still have a magic
value that means "same as checkpoint_timeout" but it's not obvious to
me that there's any value in that; the user might as well just pick
the time interval that they want.

Actually, for busy systems, the interval is probably shorter than
checkpoint_timeout. Dumping the list of buffers isn't that expensive,
and if you are doing checkpoints every half hour or so that's not
probably longer than what you want for this. So I suggest that we
should just have the documentation could recommend a suitable value
(e.g. 5 minutes) and not worry about checkpoint_timeout.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-01-25 13:32:48 Re: Substantial bloat in postgres_fdw regression test runtime
Previous Message Alvaro Herrera 2017-01-25 12:56:32 Re: multivariate statistics (v19)