diff options
author | Andres Freund <andres@anarazel.de> | 2020-09-08 11:25:34 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2020-09-08 11:25:34 -0700 |
commit | 5871f09c98588acd486a31d7bb7bd084a6553a39 (patch) | |
tree | ab61eeac3c3bf53b9df3da9d062cf46914311c00 /src | |
parent | 3438c988fd757c74ea4ddd80cdbb7405f4a1bc39 (diff) | |
download | postgresql-5871f09c98588acd486a31d7bb7bd084a6553a39.tar.gz postgresql-5871f09c98588acd486a31d7bb7bd084a6553a39.zip |
Fix autovacuum cancellation.
The problem is caused by me (Andres) having ProcSleep() look at the
wrong PGPROC entry in 5788e258bb2.
Unfortunately it seems hard to write a reliable test for autovacuum
cancellations. Perhaps somebody will come up with a good approach, but
it seems worth fixing the issue even without a test.
Reported-By: Jeff Janes <jeff.janes@gmail.com>
Author: Jeff Janes <jeff.janes@gmail.com>
Discussion: https://postgr.es/m/CAMkU=1wH2aUy+wDRDz+5RZALdcUnEofV1t9PzXS_gBJO9vZZ0Q@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/storage/lmgr/proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c index aa9fbd80545..19a9f939492 100644 --- a/src/backend/storage/lmgr/proc.c +++ b/src/backend/storage/lmgr/proc.c @@ -1318,7 +1318,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable) * Only do it if the worker is not working to protect against Xid * wraparound. */ - vacuumFlags = ProcGlobal->vacuumFlags[proc->pgxactoff]; + vacuumFlags = ProcGlobal->vacuumFlags[autovac->pgxactoff]; if ((vacuumFlags & PROC_IS_AUTOVACUUM) && !(vacuumFlags & PROC_VACUUM_FOR_WRAPAROUND)) { |