hapostgres / pg_auto_failover

Postgres extension and service for automated failover and high-availability
Other
1.1k stars 116 forks source link

Can't configure replication.maximum_backup_rate before pg_autoctl create postgres #780

Closed amontalban closed 2 years ago

amontalban commented 3 years ago

Hi,

I need to configure replication.maximum_backup_rate to a higher rate than the default (100Mbps) as I have a 25Gbps network. I am trying to run this command:

pg_autoctl config set replication.maximum_backup_rate 300M

And I get the following error:

16:30:10 557345 FATAL Expected configuration file does not exists: "/var/lib/postgresql/.config/pg_autoctl/data/pgsql/pg_autoctl.cfg"

If I try to create an empty file on that path I then get:

17:29:08 2133 ERROR Failed to find section pg_autoctl in "/var/lib/postgresql/.config/pg_autoctl/data/pgsql/pg_autoctl.cfg"
17:29:08 2133 FATAL Failed to parse configuration file "/var/lib/postgresql/.config/pg_autoctl/data/pgsql/pg_autoctl.cfg"

How can I bootstrap a pg_autoctl config file that will allow me to config the needed settings before running pg_autoctl create postgres?

Thanks!

amontalban commented 3 years ago

This might be another related case of #382