Skip to content

Navigation Menu

Sign in
Sign up

Fix AO storage reloptions causing spurious TOAST wraparound vacuums - #1965

Draft
reshke wants to merge 2 commits into
main from
fix_issue_1915
Draft

Fix AO storage reloptions causing spurious TOAST wraparound vacuums #1965
reshke wants to merge 2 commits into
main from
fix_issue_1915

Conversation

@reshke

@reshke reshke commented Sep 5, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

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

  • Bug fix (non-breaking change)
  • New feature (non-breaking change)
  • Breaking change (fix or feature with breaking changes)
  • Documentation update

Breaking Changes

Test Plan

  • Unit tests added/updated
  • Integration tests added/updated
  • Passed make installcheck
  • Passed make -C src/test installcheck-cbdb-parallel

Impact

Performance:

User-facing changes:

Dependencies:

Checklist

Additional Context

CI Skip Instructions


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

Copy link
Copy Markdown
Contributor Author

* spurious aggressive wraparound vacuums. AO auxiliary and TOAST
* relations use the heap AM, so they are unaffected by this guard.
*/
if (IsAccessMethodAO(relam))

@yjhjstz yjhjstz Sep 7, 2026

Copy link
Copy Markdown
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@yjhjstz yjhjstz yjhjstz left review comments
@gfphoenix78 gfphoenix78 Awaiting requested review from gfphoenix78
@my-ship-it my-ship-it Awaiting requested review from my-ship-it

At least 2 approving reviews are required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /