line |
true |
false |
branch |
63
|
0 |
10 |
if @_ < 1 |
|
0 |
10 |
if @_ > 1 |
79
|
0 |
10 |
if (defined $ENV{'POSTGRES_HOME'}) |
169
|
0 |
0 |
if @_ < 1 |
|
0 |
0 |
if @_ > 1 |
193
|
0 |
0 |
if @_ < 1 |
|
0 |
0 |
if @_ > 1 |
211
|
0 |
10 |
if @_ < 1 |
|
0 |
10 |
if @_ > 1 |
213
|
0 |
10 |
if ($prog) |
216
|
0 |
0 |
if ($ret =~ /(\d+)(?:\.|devel|beta)/u and $1 >= 9) |
242
|
0 |
0 |
if @_ < 1 |
|
0 |
0 |
if @_ > 1 |
243
|
0 |
0 |
$self->unix_socket ? : |
262
|
0 |
0 |
if @_ < 1 |
|
0 |
0 |
if @_ > 1 |
271
|
0 |
0 |
if $self->pg_version >= "9.5" |
320
|
0 |
0 |
if @_ < 1 |
|
0 |
0 |
if @_ > 1 |
321
|
0 |
0 |
$self->unix_socket ? : |
338
|
0 |
10 |
if @_ < 2 |
|
0 |
10 |
if @_ > 2 |
340
|
10 |
0 |
unless $self->pg_ctl |
342
|
0 |
0 |
if (defined $self->uid and $self->uid == 0) |
346
|
0 |
0 |
if (not defined $self->uid and $self->is_root) |
348
|
0 |
0 |
unless (defined $ent) |
351
|
0 |
0 |
unless ($ent->uid > 0) |
358
|
0 |
0 |
if defined $self->uid |
361
|
0 |
0 |
if ($self->auto_start) |
362
|
0 |
0 |
if $self->auto_start >= 2 |
368
|
0 |
10 |
if @_ < 2 |
|
0 |
10 |
if @_ > 2 |
370
|
0 |
10 |
if (defined $self->pid and $self->_owner_pid == $$) |
387
|
0 |
0 |
if ($self->{'unix_socket'}) { } |
406
|
0 |
0 |
if @_ < 1 |
|
0 |
0 |
if @_ > 1 |
407
|
0 |
0 |
if (defined $self->pid) |
413
|
0 |
0 |
if ($self->port) { } |
426
|
0 |
0 |
if @_ < 1 |
|
0 |
0 |
if @_ > 1 |
448
|
0 |
0 |
unless ($tries--) |
453
|
0 |
0 |
if $good |
460
|
0 |
0 |
if @_ < 2 |
|
0 |
0 |
if @_ > 2 |
463
|
0 |
0 |
if ($self->pg_ctl) { } |
480
|
0 |
0 |
unless (open $pidfh, "<", $pid_path) |
497
|
0 |
0 |
unless open my $logfh, ">>", $logfile |
500
|
0 |
0 |
unless defined $pid |
502
|
0 |
0 |
if ($pid == 0) |
503
|
0 |
0 |
unless open STDOUT, ">>&", $logfh |
505
|
0 |
0 |
unless open STDERR, ">>&", $logfh |
507
|
0 |
0 |
unless chdir $self->base_dir |
509
|
0 |
0 |
if (defined $self->uid) |
510
|
0 |
0 |
unless setuid($self->uid) |
526
|
0 |
0 |
unless open $logfh, "<", $logfile |
531
|
0 |
0 |
if $lines =~ /is ready to accept connections/u |
532
|
0 |
0 |
if (waitpid($pid, 1) > 0) |
545
|
0 |
0 |
if @_ < 1 |
|
0 |
0 |
if @_ > 2 |
|
0 |
0 |
if @_ < 1 |
546
|
0 |
0 |
if ($self->pg_ctl and defined $self->base_dir) { } |
556
|
0 |
0 |
unless defined $self->pid |
564
|
0 |
0 |
if ($timeout <= 0) |
571
|
0 |
0 |
if ($timeout <= 0) |
580
|
0 |
0 |
if @_ < 2 |
|
0 |
0 |
if @_ > 2 |
589
|
0 |
0 |
if $dbh |
592
|
0 |
0 |
if ($DBI::errstr =~ /the database system is starting up/u or $DBI::errstr =~ /Connection refused/u) |
600
|
0 |
0 |
unless $dbh |
603
|
0 |
0 |
if ($dbh->selectrow_arrayref("SELECT COUNT(*) FROM pg_database WHERE datname='${dbname}'")->[0] == 0) |
604
|
0 |
0 |
unless $dbh->do("CREATE DATABASE $dbname") |
610
|
0 |
0 |
if @$seed_scripts |
616
|
0 |
0 |
if @_ < 1 |
|
0 |
0 |
if @_ > 1 |
619
|
0 |
0 |
unless chmod 0755, $self->base_dir |
621
|
0 |
0 |
if ($ENV{'USER'} and $ENV{'USER'} eq "root") |
622
|
0 |
0 |
unless chown $self->uid, -1, $self->base_dir |
626
|
0 |
0 |
if (mkdir $tmpdir) |
627
|
0 |
0 |
if ($self->uid) |
628
|
0 |
0 |
unless chown $self->uid, -1, $tmpdir |
633
|
0 |
0 |
if (not -d "File::Spec"->catdir($self->base_dir, "data")) |
634
|
0 |
0 |
if ($self->pg_ctl) { } |
647
|
0 |
0 |
unless pipe my $rfh, my $wfh |
650
|
0 |
0 |
unless defined $pid |
652
|
0 |
0 |
if ($pid == 0) |
654
|
0 |
0 |
unless open STDOUT, ">&", $wfh |
656
|
0 |
0 |
unless open STDERR, ">&", $wfh |
658
|
0 |
0 |
unless chdir $self->base_dir |
660
|
0 |
0 |
if (defined $self->uid) |
661
|
0 |
0 |
unless setuid($self->uid) |
681
|
0 |
0 |
if $? != 0 |
689
|
0 |
0 |
if (my $pg_config = $self->pg_config) { } |
690
|
0 |
0 |
unless open my $fh, ">", $conf_file |
702
|
0 |
30 |
if @_ < 2 |
|
0 |
30 |
if @_ > 2 |
705
|
0 |
30 |
if $path |
707
|
0 |
60 |
if -x "$sp/bin/$prog" |
708
|
0 |
60 |
if -x "$sp/$prog" |
714
|
0 |
0 |
if @_ < 2 |
|
0 |
0 |
if @_ > 3 |
|
0 |
0 |
if @_ < 2 |
716
|
0 |
0 |
if ($pid == 0) { } |
718
|
0 |
0 |
if (defined $self->uid) |
719
|
0 |
0 |
unless setuid($self->uid) |
721
|
0 |
0 |
if $suppress_errors |
722
|
0 |
0 |
unless exec @$cmd |
729
|
0 |
0 |
if @_ < 1 |
751
|
0 |
0 |
unless $? == 0 |
754
|
0 |
0 |
if @_ < 1 |
760
|
0 |
0 |
if ($self->pg_version > 9.6) { } |