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 3683af6 commit d4c9195Copy full SHA for d4c9195
src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -290,6 +290,32 @@ sub connstr
290
291
=pod
292
293
+=item $node->is_alive()
294
+
295
+Check if the node is alive, using pg_isready.
296
+Returns 1 if successful, 0 on failure.
297
298
+=cut
299
300
+sub is_alive
301
+{
302
+ my ($self) = @_;
303
+ local %ENV = $self->_get_env();
304
305
+ my $ret = PostgreSQL::Test::Utils::system_log(
306
+ 'pg_isready',
307
+ '--host' => $self->host,
308
+ '--port' => $self->port);
309
310
+ if ($ret != 0)
311
+ {
312
+ return 0;
313
+ }
314
+ return 1;
315
+}
316
317
+=pod
318
319
=item $node->raw_connect()
320
321
Open a raw TCP or Unix domain socket connection to the server. This is
0 commit comments