public inbox for [email protected]  
help / color / mirror / Atom feed
From: Paul Foerster <[email protected]>
To: jayakumar s <[email protected]>
Cc: [email protected]
Subject: Re: DB Switchover using repmgr--Error
Date: Tue, 26 Nov 2024 11:10:30 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAFPcKG3rETDKASy6v1r_031qqSbwnNTL2L5O52NQ5yDfx8NK5Q@mail.gmail.com>
References: <CAFPcKG3rETDKASy6v1r_031qqSbwnNTL2L5O52NQ5yDfx8NK5Q@mail.gmail.com>

Hi,

> [postgres@post1 bin]$ ./repmgr -f /var/lib/pgsql/repmgr.conf primary register
> ERROR: following errors were found in the configuration file:
>   syntax error in file "/var/lib/pgsql/repmgr.conf" line 3, near token "data_directory"
>   syntax error in file "/var/lib/pgsql/repmgr.conf" line 6, near token "log_file"
> [postgres@post1 bin]$
> 
> Conf file:
> 
> [postgres@post1 data]$ cat /var/lib/pgsql/repmgr.conf
> node_id=1
> node_name=primary
> conninfo='host=192.168.29.193 user=repmgr dbname=repmgr connect_timeout=2' data_directory='/application/pgsql/data' failover=automatic
> promote_command='/usr/pgsql-16/bin/repmgr standby promote -f /var/lib/pgsql/repmgr.conf --log-to-file'
> follow_command='/usr/pgsql-16/bin/repmgr standby follow -f /var/lib/pgsql/repmgr.conf --log-to-file --upstream-node-id=%n'
> pg_bindir='/usr/pgsql-16/bin' log_file='/usr/pgsql-16/repmgr.log'
> [postgres@post1 data]$

I'm not a repmgr guru but at first glance I would say that your config lacks two line breaks. It should probably look like this:

node_id=1
node_name=primary
conninfo='host=192.168.29.193 user=repmgr dbname=repmgr connect_timeout=2'
data_directory='/application/pgsql/data'
failover=automatic
promote_command='/usr/pgsql-16/bin/repmgr standby promote -f /var/lib/pgsql/repmgr.conf --log-to-file'
follow_command='/usr/pgsql-16/bin/repmgr standby follow -f /var/lib/pgsql/repmgr.conf --log-to-file --upstream-node-id=%n'
pg_bindir='/usr/pgsql-16/bin' log_file='/usr/pgsql-16/repmgr.log'

Cheers
Paul





view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: DB Switchover using repmgr--Error
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox