1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-13 01:00:23 +02:00

Don't warn when stop-auto is enabled on PostgreSQL >= 9.6.

PostgreSQL >= 9.6 uses non-exclusive backup which has implicit stop-auto since the backup will stop when the connection is terminated.

The warning was made more verbose in 1f2ce45e but this now seems like a bad idea since there are likely users with mixed version environments where stop-auto is enabled globally.  There's no reason to fill their logs with warnings over a harmless option.  If anything we should warn when stop-auto is explicitly set to false but this doesn't seem very important either.

Revert to the prior behavior, which is to warn and reset when stop-auto is enabled on PostgreSQL < 9.3.
This commit is contained in:
David Steele
2019-12-14 09:53:50 -05:00
parent 03849840b8
commit 6bd280f7bd
4 changed files with 20 additions and 35 deletions

View File

@ -270,10 +270,9 @@ backupInit(const InfoBackup *infoBackup)
}
// Only allow stop auto in PostgreSQL >= 9.3 and <= 9.5
if (cfgOptionBool(cfgOptStopAuto) && (result->version < PG_VERSION_93 || result->version > PG_VERSION_95))
if (cfgOptionBool(cfgOptStopAuto) && result->version < PG_VERSION_93)
{
LOG_WARN(
CFGOPT_STOP_AUTO " option is only available in " PG_NAME " >= " PG_VERSION_93_STR " and <= " PG_VERSION_95_STR);
LOG_WARN(CFGOPT_STOP_AUTO " option is only available in " PG_NAME " >= " PG_VERSION_93_STR);
cfgOptionSet(cfgOptStopAuto, cfgSourceParam, BOOL_FALSE_VAR);
}