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

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

オープン
#797 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る
bug
主要言語
Go
スター
191
フォーク
72
平均マージ
2日 21時間
マージ済み PR(30日)
21

説明

`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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start in pkg/management/postgres/archiver/archiver.go, especially archiveWALViaPlugins and the handling of isWALArchiver. Reproduce the YAML case with isWALArchiver: false and verify that WAL is not archived through that plugin; done means the explicit setting is respected while capable plugins can still archive when enabled.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
go, postgresql
領域
backend, databases
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。