On a running PostgreSQL 13 instance, I tried modifying it's wal_level
system setting as follows, but it's not being respected:
postgres@localhost:postgres> SHOW wal_level
+-------------+
| wal_level |
|-------------|
| replica |
+-------------+
SHOW
Time: 0.021s
postgres@localhost:postgres> ALTER SYSTEM SET wal_level = logical;
ALTER SYSTEM
Time: 0.007s
postgres@localhost:postgres> SHOW wal_level
+-------------+
| wal_level |
|-------------|
| replica |
+-------------+
SHOW
Time: 0.021s
postgres@localhost:postgres>
Unfortunately, this is set in the DockerHub image by the Postgres people, so it's not trivial to just modify a configuration file and restart. Indeed workarounds can be done, but I'm hoping the community can suggest a way to do it live from a Postgres client session.
EDIT (additional for comment below):
postgres@localhost:postgres> select * from pg_settings where name ='wal_level';
--+-----------------------------------+------------+-------------+--------------+--------------+-------------------+
| enumvals | boot_val | reset_val | sourcefile | sourceline | pending_restart |
--+-----------------------------------+------------+-------------+--------------+--------------+-------------------|
| ['minimal', 'replica', 'logical'] | replica | replica | <null> | <null> | False |
--+-----------------------------------+------------+-------------+--------------+--------------+-------------------+