aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlogutils.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2025-02-25 10:07:24 +0900
committerMichael Paquier <michael@paquier.xyz>2025-02-25 10:07:24 +0900
commit3ce357584e795762aa6dc45fafc21dccea7e5ec6 (patch)
tree97dc2a4cb677b4a9d8d909aaf9794a1c656721a0 /src/backend/access/transam/xlogutils.c
parentcbb9086c9ef64b020cb9036f50afc14644bbf734 (diff)
downloadpostgresql-3ce357584e795762aa6dc45fafc21dccea7e5ec6.tar.gz
postgresql-3ce357584e795762aa6dc45fafc21dccea7e5ec6.zip
psql: Add pipeline status to prompt and some state variables
This commit adds %P to psql prompts, able to report the status of a pipeline depending on PQpipelineStatus(): on, off or abort. The following variables are added to report the state of an ongoing pipeline: - PIPELINE_SYNC_COUNT: reports the number of piped syncs. - PIPELINE_COMMAND_COUNT: reports the number of piped commands, a command being either \bind, \bind_named, \close or \parse. - PIPELINE_RESULT_COUNT: reports the results available to read with \getresults. These variables can be used with \echo or in a prompt, using "%:name:" in PROMPT1, PROMPT2 or PROMPT3. Some basic regression tests are added for these. The suggestion to use variables to show the details about the status counters comes from me. The original patch proposed was less extensible, hardcoding the output in the prompt. Author: Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com> Discussion: https://postgr.es/m/CAO6_XqroE7JuMEm1sWz55rp9fAYX2JwmcP_3m_v51vnOFdsLiQ@mail.gmail.com
Diffstat (limited to 'src/backend/access/transam/xlogutils.c')
0 files changed, 0 insertions, 0 deletions