0001-Implement-workaround-to-avoid-installcheck-failure.patch
text/x-diff
Filename: 0001-Implement-workaround-to-avoid-installcheck-failure.patch
Type: text/x-diff
Part: 0
Patch
Format: format-patch
Series: patch 0001
Subject: Implement workaround to avoid installcheck failure
| File | + | − |
|---|---|---|
| src/test/recovery/t/041_checkpoint_at_promote.pl | 11 | 0 |
From 7441e32d8d7a4737a1c37dbb9e8b8f1a51a5f5c3 Mon Sep 17 00:00:00 2001
From: Michael Paquier <michael@paquier.xyz>
Date: Fri, 23 Aug 2024 12:33:27 +0900
Subject: [PATCH] Implement workaround to avoid installcheck failure
---
src/test/recovery/t/041_checkpoint_at_promote.pl | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/test/recovery/t/041_checkpoint_at_promote.pl b/src/test/recovery/t/041_checkpoint_at_promote.pl
index 5aa05b456c..905662353d 100644
--- a/src/test/recovery/t/041_checkpoint_at_promote.pl
+++ b/src/test/recovery/t/041_checkpoint_at_promote.pl
@@ -35,6 +35,17 @@ restart_after_crash = on
]);
$node_primary->start;
+# Check if the extension injection_points is available, as it may be
+# possible that this script is run with installcheck, where the module
+# would not be installed by default.
+my $result = $node_primary->safe_psql('postgres',
+ "SELECT count(*) > 0 FROM pg_available_extensions WHERE name = 'injection_points';"
+);
+if ($result eq 'f')
+{
+ plan skip_all => 'Extension injection_points not installed';
+}
+
my $backup_name = 'my_backup';
$node_primary->backup($backup_name);
--
2.45.2