Dynamic Background Workers and clean exit - Mailing list pgsql-hackers

From Petr Jelinek
Subject Dynamic Background Workers and clean exit
Date
Msg-id 534E4D0D.5090908@2ndquadrant.com
Whole thread Raw
Responses Re: Dynamic Background Workers and clean exit  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Hello,

I've been recently doing some work with dynamic bgworkers and noticed 
that I have no way of saying "I am done now and want to exit cleanly" 
because bgworkers get restarted automatically on exit code 0 no matter 
what is the restart interval set to.

I understand the rationale for this behavior when using static bgworkers 
which are meant to run forever, but dynamic ones are spawned dynamically 
by code so they should also be able to terminate cleanly as they have 
presumably finite work to do. Also I think the clean shutdown of dynamic 
bgworker should not be logged (or at least not with the same log level 
as it is now) since it's business as usual.

Since the dyanamic bgworkers are new in 9.4 the behavior can still be 
changed.

Thoughts?


--  Petr Jelinek                  http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training &
Services



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Clock sweep not caching enough B-Tree leaf pages?
Next
From: Peter Geoghegan
Date:
Subject: Re: Clock sweep not caching enough B-Tree leaf pages?