-
Notifications
You must be signed in to change notification settings - Fork 245
Fix AO storage reloptions causing spurious TOAST wraparound vacuums - #1965
Draft
reshke wants to merge 2 commits into
Draft
Fix AO storage reloptions causing spurious TOAST wraparound vacuums #1965reshke wants to merge 2 commits into
reshke wants to merge 2 commits into
Conversation
AO tables with storage reloptions (compresstype, compresslevel, checksum, blocksize) had their embedded AutoVacOpts zero-filled by palloc0() because autovacuum reloptions are not registered for RELOPT_KIND_APPENDOPTIMIZED. These zero values were inherited by TOAST relations via extract_autovac_opts(), causing freeze_max_age=0 which triggers repeated aggressive wraparound vacuums even when the TOAST XID age is tiny. Fix: prevent extract_autovac_opts() from returning AutoVacOpts for AO parent relations. AO auxiliary and TOAST relations use the heap AM, so they are unaffected.
reshke
commented
Sep 5, 2026
Contributor
Author
yjhjstz
yjhjstz
reviewed
Sep 7, 2026
* spurious aggressive wraparound vacuums. AO auxiliary and TOAST
* relations use the heap AM, so they are unaffected by this guard.
*/
if (IsAccessMethodAO(relam))
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can handle the IsAccessMethodAO(relam) case in the existing if condition line 2955, so the additional check is unnecessary.
reshke
marked this pull request as draft
September 7, 2026 11:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
AO tables with storage reloptions (compresstype, compresslevel, checksum, blocksize) had their embedded AutoVacOpts zero-filled by palloc0() because autovacuum reloptions are not registered for RELOPT_KIND_APPENDOPTIMIZED. These zero values were inherited by TOAST relations via extract_autovac_opts(), causing freeze_max_age=0 which causing problems like issue #1915
Fixes #ISSUE_Number
What does this PR do?
Type of Change
Breaking Changes
Test Plan
make installcheckmake -C src/test installcheck-cbdb-parallelImpact
Performance:
User-facing changes:
Dependencies:
Checklist
Additional Context
CI Skip Instructions