On Tue, Sep 4, 2018 at 3:16 AM jimmy <mpo...@126.com> wrote: > On windows, how to put an entry in my db startup script to run this query > (pg_prewarm) immediately after startng the server, and let the query warm > the cache itself. >
Starting with PostgreSQL version 11 (to be released soon), you can use pg_prewarm.autoprewarm. Until then, maybe this: https://superuser.com/questions/502160/run-a-scheduled-task-after-a-windows-service-is-started I've tested neither one. Cheers, Jeff