The following bug has been logged on the website:
Bug reference: 17904
Logged by: Pawel
Email address: psadm999@gmail.com
PostgreSQL version: 11.19
Operating system: Rocky8
Description:
Hi,
I'd like to report an issue I discovered recently.
Today I noticed very weird behavior when I was setting up PostgreSQL 11.19
cluster with binary replication.
The exact version: "PostgreSQL 11.19 on x86_64-pc-linux-gnu, compiled by gcc
(GCC) 8.5.0 20210514 (Red Hat 8.5.0-16), 64-bit" running on Rocky Linux
8.7.
Basically my primary server is starting with `max_worker_processes = 4`.
Unfortunately the secondary one created with pg_basebackup was not able to
start complaining:
"FATAL: hot standby is not possible because max_worker_processes = 4 is a
lower setting than on the master server (its value was 8)."
I double checked the configs on the primary (they were correct, ie.
max_worker_processes = 4, didn't forgot to remove the comment :) ). I
restarted the cluster, etc. Still the primary was showing
max_worker_processes=4 in psql but the secondary was complaining as before,
saying:
"FATAL: hot standby is not possible because max_worker_processes = 4 is a
lower setting than on the master server (its value was 8).".
My final attempt was to put the value in single quotes and after that it
worked - primary was showing 4 and the secondary managed to connect with the
same settings.
The documentation reg. postgresql.conf file states:
"Numeric (integer and floating point): A decimal point is permitted only for
floating-point parameters. Do not use thousands separators. Quotes are not
required."
It looks that the quotes actually are required, or it's a bug? This
particular case shows the parameter value without quotes is automatically
set to default value of 8, while the dbas see the value from the
configuration file.
BR,
Pawel