puppet: Fix non-replicated PostgreSQL 10 and 11 configuration.

6f5ae8d13d removed the `$replication` variable from the
configurations of PostgreSQL 12 and higher, but left it in the
templates for PostgreSQL 10 and 11.  Because `undef != ''`,
deployments on PostgreSQL 10 and 11 started trying to push to S3
backups, regardless of if they were configured, leaving frequent log
messages like:

```
2022-04-30 12:45:47.805 UTC [626d24ec.1f8db0]: [107-1] LOG: archiver process (PID 2086106) exited with exit code 1
2022-04-30 12:45:49.680 UTC [626d24ee.1f8dc3]: [18-1] LOG: checkpoint complete: wrote 19 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=1.910 s, sync=0.022 s, total=1.950 s; sync files=16, longest=0.018 s, average=0.002 s; distance=49 kB, estimate=373 kB
/usr/bin/timeout: failed to run command "/usr/local/bin/env-wal-g": No such file or directory
2022-04-30 12:46:17.852 UTC [626d2f99.1fd4e9]: [1-1] FATAL: archive command failed with exit code 127
2022-04-30 12:46:17.852 UTC [626d2f99.1fd4e9]: [2-1] DETAIL: The failed archive command was: /usr/bin/timeout 10m /usr/local/bin/env-wal-g wal-push pg_wal/000000010000000300000080
```

Switch the PostgreSQL 10 and 11 configuration to check
`s3_backups_bucket`, like the other versions.
This commit is contained in:
Alex Vandiver 2022-05-02 12:02:46 -07:00 committed by Tim Abbott
parent ce62c11720
commit d891b9590a
3 changed files with 3 additions and 3 deletions

View File

@ -693,7 +693,7 @@ effective_io_concurrency = <%= @effective_io_concurrency %>
listen_addresses = <%= @listen_addresses %> listen_addresses = <%= @listen_addresses %>
<% end -%> <% end -%>
<% if @replication != '' -%> <% if @s3_backups_bucket != '' -%>
# Primary replication settings (ignored on replica) # Primary replication settings (ignored on replica)
wal_level = hot_standby wal_level = hot_standby
max_wal_senders = 5 max_wal_senders = 5

View File

@ -693,7 +693,7 @@ effective_io_concurrency = <%= @effective_io_concurrency %>
listen_addresses = <%= @listen_addresses %> listen_addresses = <%= @listen_addresses %>
<% end -%> <% end -%>
<% if @replication != '' -%> <% if @s3_backups_bucket != '' -%>
# Primary replication settings (ignored on replica) # Primary replication settings (ignored on replica)
wal_level = hot_standby wal_level = hot_standby
max_wal_senders = 5 max_wal_senders = 5

View File

@ -693,7 +693,7 @@ effective_io_concurrency = <%= @effective_io_concurrency %>
listen_addresses = <%= @listen_addresses %> listen_addresses = <%= @listen_addresses %>
<% end -%> <% end -%>
<% if @replication != '' -%> <% if @s3_backups_bucket != '' -%>
# Primary replication settings (ignored on replica) # Primary replication settings (ignored on replica)
wal_level = hot_standby wal_level = hot_standby
max_wal_senders = 5 max_wal_senders = 5