Re: Failed to request an autovacuum work-item in silence

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Failed to request an autovacuum work-item in silence
Date: 2018-03-09 18:08:24
Message-ID: CAD21AoDzuxtqqJB_m0hD5AWpq-GqsEF+5KKaMT5gwrJtK0HMyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thank you for reviewing!

On Thu, Mar 8, 2018 at 6:07 PM, Ildar Musin <i(dot)musin(at)postgrespro(dot)ru> wrote:
> Just couple remarks. I would rename 'requested' variable in
> AutoVacuumRequestWork() func to something like 'success' or 'result'.
> Because request is something caller does. And I would also rephrase log
> message as follows:
>
> request for autovacuum work item "%s" for "%s" failed

Agreed.

On Thu, Mar 8, 2018 at 10:46 PM, Alvaro Herrera
<alvherre(at)2ndquadrant(dot)com> wrote:
> Hi
>
> I was thinking that the BRIN code requesting the workitem would print
> the error message based on the return value. There is no point to
> returning a boolean indicator if the caller isn't going to do anything
> with it ... This means you don't need to convert the type to string in
> autovacuum.c (which would defeat attempts at generalizing this code).
>

Agreed.

Attached an updated patch. Please review it.

Regards,

--
Masahiko Sawada
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Attachment Content-Type Size
report_autovac_workitem_request_failure_v3.patch text/x-patch 2.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2018-03-09 18:40:55 Re: [HACKERS] GUC for cleanup indexes threshold.
Previous Message Pavan Deolasee 2018-03-09 17:54:46 Re: Faster inserts with mostly-monotonically increasing values