Re: DB Switchover using repmgr--Error

From: Paul Foerster <paul(dot)foerster(at)gmail(dot)com>
To: jayakumar s <kumardba27(dot)postgresql(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: DB Switchover using repmgr--Error
Date: 2024-11-26 10:10:30
Message-ID: A89BE85B-67D4-4A13-8727-087413B879EA@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

> [postgres(at)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(at)post1 bin]$
>
> Conf file:
>
> [postgres(at)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(at)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim McLaughlin 2024-11-26 11:34:06 change JSON serialization for BIGINT?
Previous Message Paul Foerster 2024-11-26 09:59:40 PostgreSQL 15.10 update corrective action for ATTACH PARTITION/DETACH PARTITION