Skip to content

Add progress bar during query execution to track progress. #63

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

Merged
merged 4 commits into from
Jul 16, 2025

Conversation

sokolcati
Copy link
Contributor

Progress bar is run-time SQL-query progress indicator.

Function pg_progress_bar(pid) extracts the current query state from backend with specified 'pid'. Then gets the
numerical values of the actual rows and total rows and count progress for the whole query tree. Function returns
numeric value from 0 to 1 describing the measure of query fulfillment. This function can be used to be embedded
in the PostgreSQL GUI.

To intuitively track progress without using a graphical client, you can use the additionally implemented function
pg_progress_bar_visual(pid, delay). It prints state every period specified by 'delay' (in seconds).

Increase version to 1.2 due to init.sql change.

Ekaterina Sokolova added 4 commits February 25, 2025 12:52
Progress bar is run-time SQL-query progress indicator.

Function pg_progress_bar(pid) extracts the current query state from backend with specified 'pid'. Then gets the
numerical values of the actual rows and total rows and count progress for the whole query tree. Function returns
numeric value from 0 to 1 describing the measure of query fulfillment. This function can be used to be embedded
in the PostgreSQL GUI.

To intuitively track progress without using a graphical client, you can use the additionally implemented function
pg_progress_bar_visual(pid, delay). It prints state every period specified by 'delay' (in seconds).

Increase version to 1.2 due to init.sql change.
@sokolcati sokolcati requested a review from MakSl July 15, 2025 09:32
Copy link

codecov bot commented Jul 15, 2025

Codecov Report

Attention: Patch coverage is 69.86301% with 44 lines in your changes missing coverage. Please review.

Project coverage is 75.74%. Comparing base (b3ae98e) to head (2af51c2).

Files with missing lines Patch % Lines
pg_query_state.c 69.86% 44 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #63      +/-   ##
==========================================
- Coverage   77.03%   75.74%   -1.30%     
==========================================
  Files          10       10              
  Lines         736      878     +142     
==========================================
+ Hits          567      665      +98     
- Misses        169      213      +44     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@MakSl MakSl left a comment

Choose a reason for hiding this comment

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

everything all right

@sokolcati sokolcati merged commit c927d0c into master Jul 16, 2025
0 of 4 checks passed
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.

2 participants