We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8167a63 commit dc25f7bCopy full SHA for dc25f7b
internal/controller/postgrescluster/metrics_setup.sql
@@ -302,8 +302,16 @@ IF p_known_hba_hash IS NOT NULL THEN
302
v_valid := 0;
303
END IF;
304
305
-IF (v_hba_hash_old IS NOT NULL) AND (v_hba_hash != v_hba_hash_old) THEN
306
- v_valid := 1;
+/* If the table is not empty or a manual hash was given,
+ * then we want to compare the old hash (from the table)
307
+ * with the new hash: if those differ, then we set the validity to 1;
308
+ * if they are the same, then we honor what the validity was
309
+ * in the table (which would be 1).
310
+ */
311
+IF (v_hba_hash_old IS NOT NULL) THEN
312
+ IF (v_hba_hash != v_hba_hash_old) THEN
313
+ v_valid := 1;
314
+ END IF;
315
ELSE
316
317
0 commit comments