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

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

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.
Copy link

codecov bot commented Nov 29, 2024

Codecov Report

Attention: Patch coverage is 69.17808% with 45 lines in your changes missing coverage. Please review.

Project coverage is 87.21%. Comparing base (5dec7d4) to head (29fd922).

Files with missing lines Patch % Lines
pg_query_state.c 69.17% 45 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #59      +/-   ##
==========================================
- Coverage   90.90%   87.21%   -3.70%     
==========================================
  Files          10       10              
  Lines         748      884     +136     
==========================================
+ Hits          680      771      +91     
- Misses         68      113      +45     

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

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.

1 participant