Skip to content

Commit 067deaf

Browse files
committed
Make sure we don't skip databases that are supposed to be vacuumed "exactly
now". This can happen if the time granularity is not very high. Per ITAGAKI Takahiro.
1 parent e292090 commit 067deaf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/postmaster/autovacuum.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.45 2007/05/04 02:06:13 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/postmaster/autovacuum.c,v 1.46 2007/05/07 20:41:24 alvherre Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -1036,8 +1036,8 @@ do_start_worker(void)
10361036
* Skip this database if its next_worker value falls between
10371037
* the current time and the current time plus naptime.
10381038
*/
1039-
if (TimestampDifferenceExceeds(current_time,
1040-
dbp->adl_next_worker, 0) &&
1039+
if (!TimestampDifferenceExceeds(dbp->adl_next_worker,
1040+
current_time, 0) &&
10411041
!TimestampDifferenceExceeds(current_time,
10421042
dbp->adl_next_worker,
10431043
autovacuum_naptime * 1000))

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy