From 3d17255400ed81c5e4985f26057593b8547df39e Mon Sep 17 00:00:00 2001 From: anastasia Date: Wed, 8 Sep 2021 13:20:17 +0300 Subject: [PATCH] Add comment to 'pg stop' changes --- control_plane/src/compute.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/control_plane/src/compute.rs b/control_plane/src/compute.rs index d11d5e2723..a2a86e4736 100644 --- a/control_plane/src/compute.rs +++ b/control_plane/src/compute.rs @@ -482,6 +482,13 @@ impl PostgresNode { } pub fn stop(&self, destroy: bool) -> Result<()> { + // If we are going to destroy data directory, + // use immediate shutdown mode, otherwise, + // shutdown gracefully to leave the data directory sane. + // + // Compute node always starts from scratch, so stop + // without destroy only used for testing and debugging. + // if destroy { self.pg_ctl(&["-m", "immediate", "stop"], &None)?; println!(