Skip to content

Commit e33967b

Browse files
committed
Comment on expectations for AutoVacuumWorkItem handlers.
This might prevent a repeat of the brin_summarize_range() vulnerability that commit a117ceb fixed.
1 parent 27f5c71 commit e33967b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/postmaster/autovacuum.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -2655,7 +2655,10 @@ perform_work_item(AutoVacuumWorkItem *workitem)
26552655
/* Use PortalContext for any per-work-item allocations */
26562656
MemoryContextSwitchTo(PortalContext);
26572657

2658-
/* have at it */
2658+
/*
2659+
* Have at it. Functions called here are responsible for any required
2660+
* user switch and sandbox.
2661+
*/
26592662
switch (workitem->avw_type)
26602663
{
26612664
case AVW_BRINSummarizeRange:

0 commit comments

Comments
 (0)