For the most part, we can and do tear down plog before we re-run the open_logs hook. But the stderr pipe, and especially the stderr/main server log's pipe process, really must survive the open_logs phase (and then be torn down once new logs were successfully opened).
I implemented this in terms of holding the whole plog open, and flipping between two generations, but I have to dump this approach. The risk of hitting max handles gets pretty serious opening two entire sets of virtual hosts error logs at once. The new option I'm starting on is to have the stderr/main error log live as a distinct child of the pglobal pool, torn down only at the appropriate time once the new stderr generation is all hooked up. It requires a little more work that I'll wrap up tomorrow, just to ensure that reliable piped logs aren't harmed with this change. It took me the better part of today to wrap my head around the setup/ teardown/recycle and how they impacted reliable piped logs. (Yes, the existing code /apparently/ works, but don't be deceived by the current dumb luck. Depending on the logger, we are also equally capable of hanging up as the parent kills our shell.) Bill