cloudnative-pg / cloudnative-pg/plugin-barman-cloud

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

Aperta
#797 1 commento 1 reazione 0 assegnatari Vedi su GitHub
bug
Lingua principale
Go
Stelle
191
Fork
72
Merge medio
2g 21h
PR unite (30g)
21

Descrizione

`isWALArchiver` is ignored and [plugins are always used to archive WAL files](https://github.com/cloudnative-pg/cloudnative-pg/blob/3f2626d709c24ffdb3fb325e2fb09861d816467c/pkg/management/postgres/archiver/archiver.go#L298) if they have the capability to do it.

Given the following plugins stanza:

```yaml
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](https://github.com/cloudnative-pg/cloudnative-pg/blob/3f2626d709c24ffdb3fb325e2fb09861d816467c/pkg/management/postgres/archiver/archiver.go#L277). 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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.