From: | ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Autovacuum launcher doesn't notice death of postmaster immediately |
Date: | 2007-06-12 08:35:55 |
Message-ID: | 20070612172451.6C41.ITAGAKI.TAKAHIRO@oss.ntt.co.jp |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Alvaro Herrera <alvherre(at)commandprompt(dot)com> wrote:
> > No, I meant a "while (sleep 1(or 10) and counter < longtime) check for
> > exit" instead of "sleep longtime".
>
> Ah; yes, what I was proposing (or thought about proposing, not sure if I
> posted it or not) was putting a upper limit of 10 seconds in the sleep
> (bgwriter sleeps 10 seconds if configured to not do anything). Though
> 10 seconds may seem like an eternity for systems like the ones Peter was
> talking about, where there is a script trying to restart the server as
> soon as the postmaster dies.
Here is a patch for split-sleep of autovacuum_naptime.
There are some other issues in CVS HEAD; We use the calculation
{autovacuum_naptime * 1000000} in launcher_determine_sleep().
The result will be corrupted if we set autovacuum_naptime to >2147.
In another place, we use {autovacuum_naptime * 1000}, so we should
set the upper bound to INT_MAX/1000 instead of INT_MAX.
Incidentally, we've already had the same protections for
log_min_duration_statement and log_autovacuum.
I hope this patch could fix those large-autovacuum_naptime problems.
Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center
Attachment | Content-Type | Size |
---|---|---|
autovacuum_naptime_overflow.patch | application/octet-stream | 1.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Zeugswetter Andreas ADI SD | 2007-06-12 09:37:56 | Re: Selecting a constant question |
Previous Message | Heikki Linnakangas | 2007-06-12 08:06:58 | Re: Selecting a constant question |
From | Date | Subject | |
---|---|---|---|
Next Message | Zdenek Kotala | 2007-06-12 10:23:50 | Re: Autovacuum launcher doesn't notice death of postmaster immediately |
Previous Message | Pavel Stehule | 2007-06-12 06:36:33 | Re: WIP: updatable cursors in plpgsql |