From 811702cf3e34783f931fb4ae78861611b9b9e12d Mon Sep 17 00:00:00 2001 From: James Guthrie Date: Wed, 27 Jul 2022 14:36:25 +0200 Subject: [PATCH] Can only exec ps_trace.delete_all_traces() when Promscale not running (#1338) --- promscale/manage-data/delete-data.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/promscale/manage-data/delete-data.md b/promscale/manage-data/delete-data.md index 047b29b05454..d4b805da2cf9 100644 --- a/promscale/manage-data/delete-data.md +++ b/promscale/manage-data/delete-data.md @@ -121,7 +121,13 @@ SELECT compress_chunk(show_chunks('prom_data.container_cpu_load_average_10s', ol You can delete all trace data from the database using the `ps_trace.delete_all_traces()` function. This function restores the schema to a default state, truncates the tables in the `_ps_trace` schema, and deletes all -the data. +the data. You can only run the function when the Promscale Connector is not +running. + +To run this function: first stop the Promscale Connector, then connect to the +database and run `SELECT ps_trace.delete_all_traces();`, finally start the +Promscale Connector. + [retention]: /promscale/:currentVersion:/manage-data/retention/ [web-enable-admin-api]: /promscale/:currentVersion:/cli/#web-server-flags