From: Heikki Linnakangas Date: Wed, 12 Nov 2008 10:10:32 +0000 (+0000) Subject: Fix off-by-one error in autovacuum shmem struct sizing. This could lead to X-Git-Tag: REL8_4_BETA1~720 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4c22564471e2724bcc62bc2c61ece796c946f16e;p=postgresql Fix off-by-one error in autovacuum shmem struct sizing. This could lead to autovacuum worker sending SIGUSR1 signal to wrong process, per Zou Yong's report. Backpatch to 8.3. --- diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index fd1489947f..c85ad81a8e 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -55,7 +55,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.86 2008/11/03 19:03:41 alvherre Exp $ + * $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.87 2008/11/12 10:10:32 heikki Exp $ * *------------------------------------------------------------------------- */ @@ -222,7 +222,7 @@ typedef enum { AutoVacForkFailed, /* failed trying to start a worker */ AutoVacRebalance, /* rebalance the cost limits */ - AutoVacNumSignals = AutoVacRebalance /* must be last */ + AutoVacNumSignals /* must be last */ } AutoVacuumSignal; /*-------------