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

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

Abierto
#797 1 comentario 1 reacción 0 asignados Ver en GitHub
bug
Lenguaje dominante
Go
Estrellas
191
Forks
72
Merge medio
2 d 21 h
PR fusionados (30 d)
21

Descripción

`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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
go, postgresql
Área
backend, databases
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bien especificado
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.