From d1df6f5ea08cc0a0b166bd6913a05d208de55585 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 4 Apr 2018 16:55:33 +0000 Subject: [PATCH v7 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 7a48286108..55999b21d0 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