From 10dee9e8ecbf8351c362e0d480172cec48f1025b Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 4 Apr 2018 16:55:33 +0000 Subject: [PATCH v8 05/12] Add assertion that we are not an autovacuum worker in expand_vacuum_rel(). --- src/backend/commands/vacuum.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 8902eba337..d539e33b8b 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -443,6 +443,12 @@ expand_vacuum_rel(VacuumRelation *vrel) Form_pg_class classForm; bool include_parts; + /* + * Since autovacuum workers supply OIDs when calling vacuum(), no + * autovacuum worker should reach this code. + */ + Assert(!IsAutoVacuumWorkerProcess()); + /* * We transiently take AccessShareLock to protect the syscache lookup * below, as well as find_all_inheritors's expectation that the caller -- 2.16.2