plugin-barman-cloud icon indicating copy to clipboard operation
plugin-barman-cloud copied to clipboard

[Bug] Plugins are always used to archive WAL files if they have the capability

Open kruton opened this issue 8 months ago • 1 comments

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:

  1. if you specify a plugin as the WAL archiver and it doesn't have that capability.
  2. you don't specify any plugins

kruton avatar Mar 06 '26 21:03 kruton

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.

Leave Feedback Ask Dosu about plugin-barman-cloud Share Dosu with your team

dosubot[bot] avatar Mar 06 '26 21:03 dosubot[bot]