Description:
Problem
repmgr standby clone performs a hard validation check that fails when archive_mode = on but archive_command = '' (empty string). This creates a conflict with backup solutions that require archive_command to be empty so they can manage WAL archiving themselves.
Error:
ERROR: parameter "archive_command" must be set to a valid command
Relevant code (from repmgr-action-standby.c):
https://github.com/EnterpriseDB/repmgr/blame/e696e28f438fcc73beaaec9a17238286f9a77115/repmgr-action-standby.c#L6443
if (guc_set(conn, "archive_mode", "!=", "off"))
{
i = guc_set(conn, "archive_command", "!=", "");
if (i == 0 || i == -1)
{
log_error(_("parameter \"archive_command\" must be set to a valid command"));
exit(ERR_BAD_CONFIG);
}
}
Real-World Use Case
Veeam Backup & Replication explicitly requires PostgreSQL instances to have:
archive_mode = on
archive_command = '' # MUST be empty
[Official Veeam documentation](https://helpcenter.veeam.com/docs/backup/vsphere/postgresql_backup.html) states: "The archive_command parameter must not contain any values in PostgreSQL instances."
Veeam manages WAL archiving through its own mechanisms and sets archive_command dynamically during backup operations. Having a pre-configured command interferes with this process.
Current Workarounds (All Problematic)
-
Temporarily set /bin/true then change back after clone
- Requires manual intervention or complex automation
- Creates a window where the configuration is wrong for Veeam
- Not suitable for automated deployments
-
Manual clone with pg_basebackup then register
- Bypasses repmgr's useful pre-flight checks
- More error-prone
- Loses the benefits of
repmgr standby clone
Proposed Solution
Add a flag to skip archive_command validation:
repmgr standby clone --skip-archive-validation
# or
repmgr standby clone --no-check-archive-command
This would allow users who understand the implications (and are using external backup solutions) to proceed with empty archive_command.
Alternative Solutions
- Make the validation a warning instead of a hard error
- Add a configuration option in
repmgr.conf: validate_archive_command = false
- Only validate if NOT using streaming replication (where archive_command is less critical)
Environment
- PostgreSQL: 15
- repmgr: 5.x
- Backup solution: Veeam Backup & Replication
- OS: Ubuntu 24
Additional Context
According to [PostgreSQL documentation](https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-ARCHIVE-COMMAND), setting archive_command = '' is a valid configuration for temporarily disabling archiving while keeping archive_mode = on. Many enterprise backup solutions (Veeam, Commvault, etc.) rely on this pattern.
The hard validation in repmgr makes it incompatible with these enterprise backup solutions without workarounds, which is a significant limitation for production deployments.
Description:
Problem
repmgr standby cloneperforms a hard validation check that fails whenarchive_mode = onbutarchive_command = ''(empty string). This creates a conflict with backup solutions that requirearchive_commandto be empty so they can manage WAL archiving themselves.Error:
Relevant code (from
repmgr-action-standby.c):https://github.com/EnterpriseDB/repmgr/blame/e696e28f438fcc73beaaec9a17238286f9a77115/repmgr-action-standby.c#L6443
Real-World Use Case
Veeam Backup & Replication explicitly requires PostgreSQL instances to have:
[Official Veeam documentation](https://helpcenter.veeam.com/docs/backup/vsphere/postgresql_backup.html) states: "The archive_command parameter must not contain any values in PostgreSQL instances."
Veeam manages WAL archiving through its own mechanisms and sets
archive_commanddynamically during backup operations. Having a pre-configured command interferes with this process.Current Workarounds (All Problematic)
Temporarily set
/bin/truethen change back after cloneManual clone with
pg_basebackupthen registerrepmgr standby cloneProposed Solution
Add a flag to skip archive_command validation:
repmgr standby clone --skip-archive-validation # or repmgr standby clone --no-check-archive-commandThis would allow users who understand the implications (and are using external backup solutions) to proceed with empty
archive_command.Alternative Solutions
repmgr.conf:validate_archive_command = falseEnvironment
Additional Context
According to [PostgreSQL documentation](https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-ARCHIVE-COMMAND), setting
archive_command = ''is a valid configuration for temporarily disabling archiving while keepingarchive_mode = on. Many enterprise backup solutions (Veeam, Commvault, etc.) rely on this pattern.The hard validation in repmgr makes it incompatible with these enterprise backup solutions without workarounds, which is a significant limitation for production deployments.