mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-01 14:41:24 +02:00
Add assertion in expand_vacuum_rel() for non-autovacuum path
The code path where the assertion is added helps to check that autovacuum always includes a relation OID when doing a vacuum on it. Extracted from a larger patch set to add support for SKIP LOCKED with manual VACUUM commands. Author: Nathan Bossart Discussion: https://postgr.es/m/9EF7EBE4-720D-4CF1-9D0E-4403D7E92990@amazon.com
This commit is contained in:
parent
9a7b7adc13
commit
6551f3daa2
@ -443,6 +443,12 @@ expand_vacuum_rel(VacuumRelation *vrel)
|
|||||||
Form_pg_class classForm;
|
Form_pg_class classForm;
|
||||||
bool include_parts;
|
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
|
* We transiently take AccessShareLock to protect the syscache lookup
|
||||||
* below, as well as find_all_inheritors's expectation that the caller
|
* below, as well as find_all_inheritors's expectation that the caller
|
||||||
|
Loading…
Reference in New Issue
Block a user