aboutsummaryrefslogtreecommitdiff
path: root/src/tutorial/syscat.source
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2021-06-25 10:46:10 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2021-06-25 10:46:10 -0400
commit04a47605727753de40d5ecbc4f2e7dc38577a7c2 (patch)
tree9c09efbfc9911f756cd2beffce40df7c6cef3ca6 /src/tutorial/syscat.source
parent79c24a0c21c4e6d4e62ff0a2314b6dd759c1dd37 (diff)
downloadpostgresql-04a47605727753de40d5ecbc4f2e7dc38577a7c2.tar.gz
postgresql-04a47605727753de40d5ecbc4f2e7dc38577a7c2.zip
Make walsenders show their replication commands in pg_stat_activity.
A walsender process that has executed a SQL command left the text of that command in pg_stat_activity.query indefinitely, which is quite confusing if it's in RUNNING state but not doing that query. An easy and useful fix is to treat replication commands as if they were SQL queries, and show them in pg_stat_activity according to the same rules as for regular queries. While we're at it, it seems also sensible to set debug_query_string, allowing error logging and debugging to see the replication command. While here, clean up assorted silliness in exec_replication_command: * Clean up SQLCmd code path, and fix its only-accidentally-not-buggy memory management. * Remove useless duplicate call of SnapBuildClearExportedSnapshot(). * replication_scanner_finish() was never called. Back-patch of commit f560209c6 into v10-v13. I'd originally felt that this didn't merit back-patching, but subsequent confusion while debugging walsender problems suggests that it'll be useful. Also, the original commit has now aged long enough to provide some comfort that it won't cause problems. Discussion: https://postgr.es/m/2673480.1624557299@sss.pgh.pa.us Discussion: https://postgr.es/m/880181.1600026471@sss.pgh.pa.us
Diffstat (limited to 'src/tutorial/syscat.source')
0 files changed, 0 insertions, 0 deletions