Don't auto-restart per-database autoprewarm workers.
authorRobert Haas
Mon, 18 Mar 2019 19:21:09 +0000 (15:21 -0400)
committerRobert Haas
Mon, 18 Mar 2019 19:30:32 +0000 (15:30 -0400)
commitfc8b39a46eb7132edc0165f23b738a2292ee9ca9
tree2ac598f539e18e165faa479e9b0dd53b4b492021
parentdcf2a0db8529b81a57d421e0fd59297d10d5f0b6
Don't auto-restart per-database autoprewarm workers.

We should try to prewarm each database only once.  Otherwise, if
prewarming fails for some reason, it will just keep retrying in an
infnite loop.  This can happen if, for example, the database has been
dropped.  The existing code was intended to implement the try-once
behavior, but failed to do so because it neglected to set
worker.bgw_restart_time to BGW_NEVER_RESTART.

Mithun Cy, per a report from Hans Buschmann

Discussion: http://postgr.es/m/CA+hUKGKpQJCWcgyy3QTC9vdn6uKAR_8r__A-MMm2GYfj45caag@mail.gmail.com
contrib/pg_prewarm/autoprewarm.c