From cd4295ab34ff9f2e16d3067f359af22cc6bec5ae Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Mon, 14 Jul 2025 22:28:57 +0200 Subject: [PATCH] fix(postgresql): add note about CLI utils options --- knowledge base/postgresql.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/knowledge base/postgresql.md b/knowledge base/postgresql.md index 3f51321..f3a7347 100644 --- a/knowledge base/postgresql.md +++ b/knowledge base/postgresql.md @@ -223,6 +223,20 @@ pg_dumpall … --globals-only pg_dumpall … -g --no-role-passwords ``` +> [!important] +> Prefer separating command line options from their values via the `=` character than using a space.
+> This prevents confusion and errors. +> +>
+> +> ```diff +> pg_dumpall --no-publications \ +> - --format d --jobs 4 --exclude-schema archived --exclude-schema bi +> + --format='d' --jobs=4 --exclude-schema='archived' --exclude-schema='bi' +> ``` +> +>
+ ## Restore Refer [psql] and [pg_restore]. @@ -241,7 +255,8 @@ being restored. The archive files are designed to be portable across architectures. > [!important] -> Executing a restore on an online database will very much take if offline. +> Executing a restore on an online database will probably introduce conflicts of some kind. +> It is very much suggested to take the target offline before restoring. ```sh # Restore dumps