Comment on expectations for AutoVacuumWorkItem handlers.

This might prevent a repeat of the brin_summarize_range() vulnerability
that commit a117cebd63 fixed.
This commit is contained in:
Noah Misch 2023-03-25 13:00:27 -07:00
parent 27f5c712b2
commit e33967b13b
1 changed files with 4 additions and 1 deletions

View File

@ -2655,7 +2655,10 @@ perform_work_item(AutoVacuumWorkItem *workitem)
/* Use PortalContext for any per-work-item allocations */
MemoryContextSwitchTo(PortalContext);
/* have at it */
/*
* Have at it. Functions called here are responsible for any required
* user switch and sandbox.
*/
switch (workitem->avw_type)
{
case AVW_BRINSummarizeRange: