mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
Changed log test order to ignore unimportant log errors while shutting down PostgreSQL.
This commit is contained in:
parent
84caca0f34
commit
ac1574448e
@ -163,6 +163,16 @@
|
|||||||
</contributor-list>
|
</contributor-list>
|
||||||
|
|
||||||
<release-list>
|
<release-list>
|
||||||
|
<release date="XXXX-XX-XX" version="1.23dev" title="UNDER DEVELOPMENT">
|
||||||
|
<release-test-list>
|
||||||
|
<release-bug-list>
|
||||||
|
<release-item>
|
||||||
|
<p>Changed log test order to ignore unimportant log errors while shutting down <postgres/>.</p>
|
||||||
|
</release-item>
|
||||||
|
</release-bug-list>
|
||||||
|
</release-test-list>
|
||||||
|
</release>
|
||||||
|
|
||||||
<release date="2017-08-09" version="1.22" title="Fixed S3 Retry">
|
<release date="2017-08-09" version="1.22" title="Fixed S3 Retry">
|
||||||
<release-core-list>
|
<release-core-list>
|
||||||
<release-bug-list>
|
<release-bug-list>
|
||||||
|
@ -467,13 +467,7 @@ sub clusterStop
|
|||||||
# Disconnect user session
|
# Disconnect user session
|
||||||
$self->sqlDisconnect();
|
$self->sqlDisconnect();
|
||||||
|
|
||||||
# If postmaster process is running then stop the cluster
|
# Grep for errors in postgresql.log - this is done first because we want to ignore any errors that happen during shutdown
|
||||||
if (-e $self->dbBasePath() . '/' . DB_FILE_POSTMASTERPID)
|
|
||||||
{
|
|
||||||
$self->executeSimple($self->pgBinPath() . '/pg_ctl stop -D ' . $self->dbBasePath() . ' -w -s -m fast');
|
|
||||||
}
|
|
||||||
|
|
||||||
# Grep for errors in postgresql.log
|
|
||||||
if (!$bIgnoreLogError && storageTest()->exists($self->pgLogFile()))
|
if (!$bIgnoreLogError && storageTest()->exists($self->pgLogFile()))
|
||||||
{
|
{
|
||||||
$self->executeSimple(
|
$self->executeSimple(
|
||||||
@ -481,6 +475,12 @@ sub clusterStop
|
|||||||
{iExpectedExitStatus => 1});
|
{iExpectedExitStatus => 1});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# If postmaster process is running then stop the cluster
|
||||||
|
if (-e $self->dbBasePath() . '/' . DB_FILE_POSTMASTERPID)
|
||||||
|
{
|
||||||
|
$self->executeSimple($self->pgBinPath() . '/pg_ctl stop -D ' . $self->dbBasePath() . ' -w -s -m fast');
|
||||||
|
}
|
||||||
|
|
||||||
# Remove the log file
|
# Remove the log file
|
||||||
storageTest()->remove($self->pgLogFile(), {bIgnoreMissing => true});
|
storageTest()->remove($self->pgLogFile(), {bIgnoreMissing => true});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user