Skip to content

fix: remove pg_database_size from status probe - #5689

Merged
gbartolini merged 3 commits into
cloudnative-pg:mainfrom
leonardoce:dev/remove-size
Oct 1, 2024
Merged

gbartolini merged 3 commits into
cloudnative-pg:mainfrom
leonardoce:dev/remove-size

Conversation

@leonardoce

@leonardoce leonardoce commented Sep 30, 2024 •

Copy link
Copy Markdown
Contributor

The instance manager status probe was using pg_database_size which scans the whole PGDATA to compute the current size of every database.

Instead of doing that in the status probe, causing a scan in each reconciliation loop, we now do that only when requested by the kubectl cnpg status plugin.

Closes: #5686

The instance manager status probe was using `pg_database_size` which
scans the whole PGDATA to compute the current size of every database.

Instead of doing that in the status probe, causing a scan in each
reconciliation loop, we now do that only when requested by the `kubectl
cnpg status` plugin.

Closes: cloudnative-pg#5686

Signed-off-by: Leonardo Cecchi <[email protected]>
@leonardoce
leonardoce requested a review from a team September 30, 2024 14:39
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.22 labels Sep 30, 2024
@github-actions

Copy link
Copy Markdown
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

Signed-off-by: Leonardo Cecchi <[email protected]>
@leonardoce

Copy link
Copy Markdown
Contributor Author

Comment thread internal/cmd/plugin/status/status.go Resolved
@gbartolini gbartolini changed the title feat: remove pg_database_size from status probe fix: remove pg_database_size from status probe Oct 1, 2024
@gbartolini
gbartolini merged commit a1b487f into cloudnative-pg:main Oct 1, 2024
cnpg-bot pushed a commit that referenced this pull request Oct 1, 2024
The instance manager status probe was using `pg_database_size()` which
scans the whole `PGDATA` to compute the current size of every database.

Instead of doing that in the status probe, causing a scan in each
reconciliation loop, we now do that only when requested by the
`kubectl cnpg status` plugin (the only place where this information
was actually used).

Closes: #5686

Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Co-authored-by: Gabriele Bartolini <[email protected]>
(cherry picked from commit a1b487f)
cnpg-bot pushed a commit that referenced this pull request Oct 1, 2024
The instance manager status probe was using `pg_database_size()` which
scans the whole `PGDATA` to compute the current size of every database.

Instead of doing that in the status probe, causing a scan in each
reconciliation loop, we now do that only when requested by the
`kubectl cnpg status` plugin (the only place where this information
was actually used).

Closes: #5686

Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Co-authored-by: Gabriele Bartolini <[email protected]>
(cherry picked from commit a1b487f)
cnpg-bot pushed a commit that referenced this pull request Oct 1, 2024
The instance manager status probe was using `pg_database_size()` which
scans the whole `PGDATA` to compute the current size of every database.

Instead of doing that in the status probe, causing a scan in each
reconciliation loop, we now do that only when requested by the
`kubectl cnpg status` plugin (the only place where this information
was actually used).

Closes: #5686

Signed-off-by: Leonardo Cecchi <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Co-authored-by: Gabriele Bartolini <[email protected]>
(cherry picked from commit a1b487f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[chore]: remove pg_database_size from the instance manager probe

4 participants