Add application_name to compute activity monitor connection string

This was missed in my previous attempt to mark every connection string
with an application name. See 0c3e3a8667.
This commit is contained in:
Tristan Partin
2024-06-27 10:27:56 -05:00
committed by Tristan Partin
parent 1d66ca79a9
commit 5700233a47

View File

@@ -17,7 +17,11 @@ const MONITOR_CHECK_INTERVAL: Duration = Duration::from_millis(500);
// should be handled gracefully.
fn watch_compute_activity(compute: &ComputeNode) {
// Suppose that `connstr` doesn't change
let connstr = compute.connstr.as_str();
let mut connstr = compute.connstr.clone();
connstr
.query_pairs_mut()
.append_pair("application_name", "compute_activity_monitor");
let connstr = connstr.as_str();
// During startup and configuration we connect to every Postgres database,
// but we don't want to count this as some user activity. So wait until