On Wed, Oct 27, 2021 at 07:05:10PM +0000, Bossart, Nathan wrote: > On 10/27/21, 9:29 AM, "Bharath Rupireddy" > <bharath.rupireddyforpostg...@gmail.com> wrote: > > Is there a specific reason that we have a generic WARNING "worker took > > too long to start; canceled" for an autovacuum worker? Isn't it better > > with "autovacuum worker took too long to start; canceled"? It is > > confusing to see the generic message in the server logs while > > debugging an issue for a user who doesn't know the internals of > > autovacuum code. > > It looks like it has been this way for a while [0]. I don't know if > I've ever seen this message before, and from the comments near it, it > sounds like it is expected to rarely happen.
I was surprised to see that I have only two logs for this in the last 8 weeks. > > To be more informative about the message, how about the following: > > My vote is to just change it to > > ereport(WARNING, > (errmsg("autovacuum worker took too long to start; > canceled"))); > > and call it a day. If we wanted to add errdetail(), I think we should > make sure it is providing useful context, but I'm not sure what that > might look like. I think that's fine. Note that the backend_type is illuminating for those who use CSV logs, or use P13+ and log_line_prefix += %b (see 70a7b4776). session_line | 1 error_severity | WARNING message | worker took too long to start; canceled backend_type | autovacuum launcher -- Justin