Re: [BUGS] BUG #1588: pg_autovacuum sleep parameter overflow - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [BUGS] BUG #1588: pg_autovacuum sleep parameter overflow
Date
Msg-id 200505111758.j4BHw1v11072@candle.pha.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #1588: pg_autovacuum sleep parameter overflow  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
Patch applied and backpatched to 8.0.X.

---------------------------------------------------------------------------

Bruce Momjian wrote:

> Index: contrib/pg_autovacuum/pg_autovacuum.c
> ===================================================================
> RCS file: /cvsroot/pgsql/contrib/pg_autovacuum/pg_autovacuum.c,v
> retrieving revision 1.31
> diff -c -c -r1.31 pg_autovacuum.c
> *** contrib/pg_autovacuum/pg_autovacuum.c    19 Apr 2005 03:35:15 -0000    1.31
> --- contrib/pg_autovacuum/pg_autovacuum.c    11 May 2005 14:43:34 -0000
> ***************
> *** 1749,1755 ****
>               fflush(LOGOUTPUT);
>           }
>
> !         pg_usleep(sleep_secs * 1000000);    /* Larger Pause between outer loops */
>
>           gettimeofday(&then, 0); /* Reset time counter */
>
> --- 1749,1764 ----
>               fflush(LOGOUTPUT);
>           }
>
> !         /* Larger Pause between outer loops */
> !         /*
> !          *    pg_usleep() is wrong here because its maximum is ~2000 seconds,
> !          *    and we don't need signal interruptability on Win32 here.
> !          */
> ! #ifndef WIN32
> !         sleep(sleep_secs);            /* Unix sleep is seconds */
> ! #else
> !         sleep(sleep_secs * 1000);    /* Win32 sleep() is milliseconds */
> ! #endif
>
>           gettimeofday(&then, 0); /* Reset time counter */
>

>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: update some urls
Next
From: Bruce Momjian
Date:
Subject: Re: Patch that deals with that AtCommit_Portals encounters