On Tue, Jan 24, 2017 at 5:07 AM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
> I took a look at this again, and it doesn't appear to be working for me. The library is being loaded during startup,
butI don't see any further activity in the log, and I don't see an autoprewarm file in $PGDATA.
>
> There needs to be some kind of documentation change as part of this patch.
>
> 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.
>
> Having the GUC be restart-only is also pretty onerous. I don't think it'd be hard to make the worker respond to a
reload...there's code in the autovacuum launcher you could use as an example.
>
+1. I don't think there should be any problem in making it PGC_SIGHUP.
> I'm also wondering if this really needs to be a permanently running process... perhaps the worker could simply be
startedas necessary?
Do you want to invoke worker after every buff_dump_interval? I think
that will be bad in terms of starting a new process and who will
monitor when to start such a process. I think it is better to keep it
as a permanently running background process if loaded by user.
> Though maybe that means it wouldn't run at shutdown.
Yeah, that will be another drawback.
Few comments found while glancing the patch.
1.
+TO DO:
+------
+Add functionality to dump based on timer at regular interval.
I think you need to remove above TO DO.
2.
+ /* Load the page only if there exist a free buffer. We do not want to
+ * replace an existing buffer. */
This is not a PG style multiline comment.
--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com