You've already forked pgbackrest
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:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user