diff options
author | Noah Misch | 2023-03-25 20:00:27 +0000 |
---|---|---|
committer | Noah Misch | 2023-03-25 20:00:27 +0000 |
commit | e33967b13bbc6e4e1c1b5e9ecd1c45148cffcc53 (patch) | |
tree | 90222454ebe060060fc8bf1c95d8f34e837a738c /src | |
parent | 27f5c712b2c57d1c676fbf110705ac881057b57e (diff) |
Comment on expectations for AutoVacuumWorkItem handlers.
This might prevent a repeat of the brin_summarize_range() vulnerability
that commit a117cebd638dd02e5c2e791c25e43745f233111b fixed.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/postmaster/autovacuum.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/postmaster/autovacuum.c b/src/backend/postmaster/autovacuum.c index c0e2e00a7e3..585d28148ca 100644 --- a/src/backend/postmaster/autovacuum.c +++ b/src/backend/postmaster/autovacuum.c @@ -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: |