Re: Isn't it better with "autovacuum worker...." instead of "worker took too long to start; canceled" specific to "auto

From: "Bossart, Nathan" <bossartn(at)amazon(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Isn't it better with "autovacuum worker...." instead of "worker took too long to start; canceled" specific to "auto
Date: 2021-10-27 19:05:10
Message-ID: EE9AF64E-43A0-4309-BADC-7F4E8D7F4E2E@amazon.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/27/21, 9:29 AM, "Bharath Rupireddy" <bharath(dot)rupireddyforpostgres(at)gmail(dot)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.

> 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.

Nathan

[0] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=bae0b56

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-10-27 19:26:11 Re: Isn't it better with "autovacuum worker...." instead of "worker took too long to start; canceled" specific to "auto
Previous Message Tom Lane 2021-10-27 18:00:33 Re: [PATCH] remove is_member_of_role() from header, add can_set_role()