Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bodobolero/test cum stats persistence #10995

Merged
merged 11 commits into from
Feb 27, 2025

Conversation

Bodobolero
Copy link
Contributor

Problem

So far cumulative statistics have not been persisted when Neon scales to zero (suspends endpoint).
With PR #6560 the cumulative statistics should now survive endpoint restarts and correctly trigger the auto- vacuum and auto analyze maintenance

So far we did not have a testcase that validates that improvement in our dev cloud environment with a real project.

Summary of changes

Introduce testcase test_cumulative_statistics_persistencein the benchmarking workflow running daily to verify:

  • Verifies that the cumulative statistics are correctly persisted across restarts.
  • Cumulative statistics are important to persist across restarts because they are used
  • when auto-vacuum an auto-analyze trigger conditions are met.
  • The test performs the following steps:
    • Seed a new project using pgbench
    • insert tuples that by itself are not enough to trigger auto-vacuum
    • suspend the endpoint
    • resume the endpoint
    • insert additional tuples that by itself are not enough to trigger auto-vacuum but in combination with the previous tuples are
    • verify that autovacuum is triggered by the combination of tuples inserted before and after endpoint suspension

Test run

/~https://github.com/neondatabase/neon/actions/runs/13546879714/job/37860609089#step:6:282

@Bodobolero Bodobolero requested a review from a team as a code owner February 26, 2025 15:15
@Bodobolero Bodobolero requested a review from knizhnik February 26, 2025 15:15
@Bodobolero Bodobolero enabled auto-merge February 26, 2025 15:42
@Bodobolero Bodobolero disabled auto-merge February 26, 2025 15:50
Copy link

7744 tests run: 7365 passed, 0 failed, 379 skipped (full report)


Flaky tests (4)

Postgres 17

Postgres 15

Code coverage* (full report)

  • functions: 32.8% (8632 of 26347 functions)
  • lines: 48.6% (73078 of 150346 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
f6c5134 at 2025-02-26T16:30:55.518Z :recycle:

Copy link
Contributor

@alexanderlaw alexanderlaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test looks good to me in general.

@Bodobolero Bodobolero added this pull request to the merge queue Feb 27, 2025
Merged via the queue into main with commit 3a3d62d Feb 27, 2025
99 of 120 checks passed
@Bodobolero Bodobolero deleted the bodobolero/test_cum_stats_persistence branch February 27, 2025 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants