Re: Table-level log_autovacuum_min_duration

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Naoya Anzai <anzai-naoya(at)mxu(dot)nes(dot)nec(dot)co(dot)jp>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>, Akio Iwaasa <iwaasa(at)mxs(dot)nes(dot)nec(dot)co(dot)jp>
Subject: Re: Table-level log_autovacuum_min_duration
Date: 2015-03-25 06:54:16
Message-ID: CAB7nPqQ4m1R39cn5Y1ODLfQs4j+Tg8rePDDDkbBgTMcRD__HJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)2ndquadrant(dot)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 Content-Type Size
0001-Enable-tracking-of-SIGHUP-in-autovacuum-workers.patch application/x-patch 2.9 KB
0002-Make-log_autovacuum_min_duration-a-relation-option.patch application/x-patch 13.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2015-03-25 07:04:28 Re: Custom/Foreign-Join-APIs
Previous Message Pavel Stehule 2015-03-25 06:21:01 Re: proposal: plpgsql - Assert statement