On Mon, Jan 23, 2017 at 6:37 PM, Jim Nasby <jim.na...@bluetreble.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 -- Sent via pgsql-hackers mailing list (firstname.lastname@example.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers