Re: Table-level log_autovacuum_min_duration - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Table-level log_autovacuum_min_duration
Date
Msg-id CAB7nPqQ4m1R39cn5Y1ODLfQs4j+Tg8rePDDDkbBgTMcRD__HJQ@mail.gmail.com
Whole thread Raw
In response to Re: Table-level log_autovacuum_min_duration  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Responses Re: Table-level log_autovacuum_min_duration  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Table-level log_autovacuum_min_duration  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On Mon, Mar 23, 2015 at 7:46 PM, Alvaro Herrera wrote:
> Michael Paquier wrote:
>> On Mon, Mar 23, 2015 at 11:07 PM, Tom Lane wrote:
>> > Alvaro Herrera <alvherre@2ndquadrant.com> writes:
>> >> Michael Paquier wrote:
>> >>> So a worker does not see changes in postgresql.conf once it is run and
>> >>> processes a database, no? The launcher does run ProcessConfigFile()
>> >>> when SIGHUP shows up though.
>> >
>> >> Maybe this is something that we should change.
>> >
>> > Yeah, checking for SIGHUP in the worker outer loop (ie once per table)
>> > seems like a reasonable thing.
>>
>> That sounds fine to me as well. A patch would not be complicated, but
>> is this portion really 9.5 material?
>
> IMO yes.

So, attached are two patches:
- 0001 enables SIGHUP tracking in do_autovacuum(), which is checked
before processing one table. I reused avl_sighup_handler for the
worker, renaming it av_sighup_handler..
- 0002 is the patch to add log_autovacuum_min_duration as a reloption.
There is nothing really changed, the value of
log_autovacuum_min_duration being picked up at startup with
table_recheck_autovac() is used until the end for one table.
Regards,
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: plpgsql - Assert statement
Next
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Custom/Foreign-Join-APIs