On Tue, Aug 20, 2024 at 12:30:35PM -0400, Alvaro Herrera wrote: > Yeah, I like this option. Injection points require to be explicitly > enabled in configure, so skipping that test when injection_points can't > be found seems reasonable.
My apologies for the delay in doing something here. The simplest thing would be to scan pg_available_extensions after the first node is started, like in the attached. What do you think? > This also suggests that EXTRA_INSTALL should have injection_points only > when the option is enabled. If the switch is disabled, the path is just ignored, so I don't see any harm in keeping it listed all the time. > I've been curious about what exactly does this Makefile line > export enable_injection_points enable_injection_points > achieve. Without this line, the TAP tests would not be able to know if injection points are enabled or not, no? Well, it is true that we could also do something like a scan of pg_config.h in the installation path, but this is consistent with what ./configure uses. -- Michael
From 7441e32d8d7a4737a1c37dbb9e8b8f1a51a5f5c3 Mon Sep 17 00:00:00 2001 From: Michael Paquier <mich...@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
signature.asc
Description: PGP signature