Skip to content

Conversation

@jpargudo
Copy link
Contributor

@jpargudo jpargudo commented Nov 5, 2025

What kind of change does this PR introduce?

It adds some information about auto-ANALYZE in the inspect db vacuum-stats. Actually 3 new columns:

  • date: last analyze issued manually
  • date: last analyze issued by autovacuum
  • bool: yes/no : will an analyze has to be launched (or soon will be)

What is the current behavior?

Output without those 3 columns in the CSV.

What is the new behavior?

jpargudo@menelas:~/Documents/github/cli$ go run . inspect db vacuum-stats
Initialising login role...
Connecting to remote database...

  
   Table                   | Last Vacuum | Last Auto Vacuum | Last Analyze     | Last Auto Analyze | Row count      | Dead row count | Expect autovacuum? | Expect autoanalyze? 
  -------------------------|-------------|------------------|------------------|-------------------|----------------|----------------|--------------------|---------------------
   beers.beers             |             | 2025-08-21 07:42 | 2025-08-21 08:11 | 2025-08-21 07:42  |          5,901 |              0 | no                 | no                  
   beers.breweries         |             | 2025-08-21 07:42 | 2025-08-21 08:11 | 2025-08-21 07:42  |          1,414 |              2 | no                 | no                  
   beers.breweries_geocode |             | 2025-08-21 07:42 | 2025-08-21 08:11 | 2025-08-21 07:42  |          1,298 |              0 | no                 | no                  
   beers.categories        |             |                  | 2025-08-21 08:11 |                   |             12 |              0 | no                 | no                  
   beers.styles            |             |                  | 2025-08-21 08:11 | 2025-08-21 07:42  |            142 |              0 | no                 | no                  
   test.data               |             | 2025-08-28 14:58 |                  | 2025-08-28 16:57  |        412,900 |              0 | no                 | no                  

A new version of Supabase CLI is available: v2.54.11 (currently installed v)
We recommend updating regularly for new features and bug fixes: https://supabase.com/docs/guides/cli/getting-started#updating-the-supabase-cli

Additional context

For anyone working with a PostgreSQL database, those are really important informations since stats are involved in planner's choices. In short, outdated (or worse, null) stats may lead to sub-optimal performances.

Please review carrefully , this is my 1st patch at Supabase :) Thanks in advance!

@jpargudo jpargudo requested a review from a team as a code owner November 5, 2025 13:37
@coveralls
Copy link

coveralls commented Nov 5, 2025

Pull Request Test Coverage Report for Build 19104202714

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 5 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.03%) to 54.673%

Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 5 12.9%
Totals Coverage Status
Change from base Build 19100856468: -0.03%
Covered Lines: 6388
Relevant Lines: 11684

💛 - Coveralls

Make it clear with go formatter error in the file. 
Sorry I forgot to do that prior the commit.. :/
@sweatybridge sweatybridge changed the title Add auto-ANALYZE infos in "inspect db vacuum-stats" feat: add auto-ANALYZE infos in "inspect db vacuum-stats" Nov 5, 2025
Copy link
Contributor

@sweatybridge sweatybridge left a comment

Choose a reason for hiding this comment

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

Only comment is to use conventional commit message in your PR title so it triggers a release when merged.

@jpargudo jpargudo merged commit 949ce61 into develop Nov 5, 2025
20 checks passed
@jpargudo jpargudo deleted the jpa branch November 5, 2025 17:01
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.

4 participants