Skip to content

Instantly share code, notes, and snippets.

@jfrost
Created September 3, 2015 19:37
Show Gist options
  • Save jfrost/06dce22e579ae3fafdcc to your computer and use it in GitHub Desktop.
Save jfrost/06dce22e579ae3fafdcc to your computer and use it in GitHub Desktop.
# only supply or default logfile path when none is given explicitly in
# postgresql.conf
my @options = ($pg_ctl, 'start', '-D', $info{'pgdata'});
my $logsize = 0;
if ($info{'logfile'}) {
push @options, ('-l', $info{'logfile'});
# remember current size of the log
$logsize = (stat $info{'logfile'})[7] || 0; # ignore stat errors
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment