[Bug] Plugins are always used to archive WAL files if they have the capability
isWALArchiver is ignored and plugins are always used to archive WAL files if they have the capability to do it.
Given the following plugins stanza:
plugins:
- name: barman-cloud.cloudnative-pg.io
enabled: true
isWALArchiver: false
parameters:
serverName: cnpg-default
barmanObjectName: cnpg-default-barman
You would expect WAL not to be archived using this plugin. However, there is no filtering in the archiveWALViaPlugins. It always archives with plugins that support WAL archiving.
The only cases where it won't archive WAL are:
- if you specify a plugin as the WAL archiver and it doesn't have that capability.
- you don't specify any plugins
This is a known issue that has been reported in issue #606 and discussed in cloudnative-pg discussion #10166.
The root cause is in CloudNativePG's archiveWALViaPlugins function and the plugin client's ArchiveWAL method — they invoke all plugins with WAL_ARCHIVE capability rather than filtering based on isWALArchiver. The plugin-barman-cloud code itself doesn't check the isWALArchiver setting either.
According to maintainer feedback, isWALArchiver is intended as a "designation mechanism" rather than a control mechanism, but this creates confusion since users expect isWALArchiver: false to prevent archiving.
Worth noting: setting isWALArchiver: false also breaks metrics collection due to missing capability declarations.
To reply, just mention @dosu.
Docs are dead. Just use Dosu.