Ian Barwick
a2f73a5086
run_file_backup(): fix comments
...
Explicitly document use-case for this function, and fix a comment
which probably got munged by pg_indent.
2020-06-09 10:52:26 +09:00
Ian Barwick
af144d39cb
standby register: ensure location field is compared during record check
2020-05-21 14:36:20 +09:00
Ian Barwick
68ad58f5fc
repmgrd: additional check for the upstream connection
...
It's possible the upstream server was intermittently unavailable in
the interval between checks, invalidating the upstream connection.
With check types "ping" and "connection", the connection would not be
restored, so if the availability check was successful, additionally
verify the upstream connection and restore if necessary.
Addresses GitHub #633 .
2020-05-14 10:27:45 +09:00
Ian Barwick
c76fee98ef
doc: update repmgr.conf.sample
...
Was missing "query" option for "connection_check_type".
2020-05-12 17:06:10 +09:00
Ian Barwick
de634eb593
repmgrd: include node name in log output
...
Missed in commit fd52df0 .
2020-05-12 15:49:07 +09:00
Ian Barwick
03c2c8cebd
repmgrd: minor refactoring of try_primary_reconnect()
2020-05-12 15:05:54 +09:00
Ian Barwick
da7db96e76
repmgrd: consolidate connection closing code
...
PQfinish() should only be called on local PGconn pointers which
will not be reused.
2020-05-12 15:05:50 +09:00
Ian Barwick
b4c9064903
repmgrd: ensure "close_connection()" always called after connection failure
2020-05-12 15:05:46 +09:00
Ian Barwick
5abef8e4ed
repmgrd: remove redundant log message
2020-05-12 15:05:39 +09:00
Ian Barwick
0813a31c08
repmgrd: include node name in log output in more places
...
Still a few places where only the node ID was reported, but it's always
useful to have the node name as well.
2020-05-12 15:05:35 +09:00
Ian Barwick
4c7be798e0
repmgrd: ensure PQfinish() always executed on failed connections in NodeInfoLists
...
clear_node_info_list() will clean up any remaining active connections,
but we need to ensure all failed connections are cleaned up at the point
of failure to prevent leaks.
Per report in GitHub #643 .
2020-05-12 14:25:56 +09:00
Ian Barwick
0a7c7ae7ab
standby clone: explicitly set closed connection pointers to NULL
...
We omitted to do this with the connections used when checking the system
identifier, which means libpq calls by the teardown function using the
pointer risk using unallocated memory.
Addresses issue reported in GitHub #644 .
2020-05-11 14:01:09 +09:00
Ian Barwick
9ce1c2e640
doc: clarify usage of "-f /etc/repmgr.conf" in examples
2020-05-08 10:24:24 +09:00
Ian Barwick
5a2399cb25
standby check: ignore upstream/downstream connections if node is witness
...
Per report in GitHub #641 .
2020-05-08 09:45:52 +09:00
Ian Barwick
54d33dd50b
Fix typo in comment
2020-05-01 12:13:38 +09:00
Ian Barwick
2b0218456a
doc: clarify usage of the "passfile" parameter.
2020-04-23 15:04:40 +09:00
Ian Barwick
2b773480e7
Update references to "recovery.conf" in _do_create_replication_conf()
2020-04-23 11:43:12 +09:00
Ian Barwick
a934f19e80
repmgrd: improve logging of promote_command failure
...
- log failure *before* we check if the primary has reappeared
- log the error code
2020-04-21 15:03:25 +09:00
Ian Barwick
9040d53e55
standby switchover: note database name for superuser connections
...
It's useful to have a confirmation of which database repmgr is trying
to connect to when the -S/--superuser connection is provided.
It will always be the database defined in the repmgr.conf "conninfo"
parameter, but having the name available is useful when e.g.
troubleshooting issues with .pgpass configuration.
2020-04-20 16:49:56 +09:00
Ian Barwick
cb19311b35
doc: have Makefile clean up generated html files
2020-04-20 15:41:29 +09:00
Ian Barwick
9ce7cb7012
doc: clarify .pgpass usage with -S/--superuser option
2020-04-20 15:41:26 +09:00
Ian Barwick
687ed68ce2
doc: remove DEBUG output from example
2020-04-20 12:17:48 +09:00
Ian Barwick
8472d99277
doc: clarify usage of -F/--force with "standby promote"
...
Per GitHub #632 .
2020-04-20 12:17:45 +09:00
Ian Barwick
177b84345d
Fix debug logging
...
Per GitHub #630 .
2020-04-20 11:08:35 +09:00
Ian Barwick
555351f8c1
standby switchover: standardize log message
2020-04-15 10:25:48 +09:00
Ian Barwick
1e90d5e018
doc: update link to Debian package archive
...
See also https://www.df7cb.de/blog/2020/apt-archive.postgresql.org.html
2020-04-14 12:34:06 +09:00
Ian Barwick
d45e64ca9e
doc: fix typo in 5.1.0 release section ID
2020-04-13 10:40:25 +09:00
Ian Barwick
374f19675d
Bump version to 5.1.0
v5.1.0
2020-04-10 16:55:58 +09:00
Ian Barwick
ce88f3ec43
doc: finalize release notes
2020-04-10 16:40:23 +09:00
Ian Barwick
5acdd69add
doc: update release notes
2020-04-10 13:39:03 +09:00
Ian Barwick
71e23107e7
Add upgrade route for repmgr 3.x to repmgr 5.1
...
The removal of some extensions functions means it's not possible to
follow the conventional incremental upgrade path; instead we'll
create a script for direct upgrades to 5.1.
2020-04-09 16:08:35 +09:00
Ian Barwick
599bab590a
Create temporary pg.auto.conf file with the same permissions as the original
...
Commit 0574279 set the file permissions to 0600 rather than the user's
umask, but if initdb was executed with -g/--allow-group-access, the
file is maintained with 0640, so we'll just maintain the existing
permssions.
2020-04-07 13:29:59 +09:00
Ian Barwick
cd80f265ac
standby clone: warn about missing pg_rewind prerequisites
...
These are not essential for cloning a standby, but useful to warn
as early as possible in case the user is intending to use pg_rewind.
2020-04-06 15:37:37 +09:00
Ian Barwick
09f0be8ceb
Minor log output fixes
2020-04-06 13:19:58 +09:00
Ian Barwick
59159dede7
Ensure next release is 5.1, not 5.1.0
2020-04-03 14:57:17 +09:00
Ian Barwick
780453e168
repmgrd: clarify log messages
...
Display the identity of the node question in the meassges fixed
in commit 8a27c89; this makes it easier to diagnose log output.
2020-04-03 13:02:49 +09:00
Tom Janson
8a27c89d18
repmgrd: fix inverted log message
...
Warning is emitted when the node in question is in recovery.
2020-04-03 12:39:36 +09:00
Ian Barwick
0a2091d5d3
repmgrd: handle new primary notification during failover check
...
It's possible a repmgrd instance might still be in the primary check
phase while a primary has already been promoted. Therefore it's
necessary to check for new primary notifications here, so we can
follow a new primary as quickly as possible.
2020-04-02 15:45:14 +09:00
Ian Barwick
447054a630
standby promote: in --dry-run mode, display promote command which will be used
...
For PostgreSQL 12 and later, explicitly note whether repmgr user has
execution permissions on the pg_promote() function.
2020-04-02 12:37:32 +09:00
Ian Barwick
d998cab3d0
doc: add note about granting permissions on pg_promote()
2020-04-02 11:32:02 +09:00
Ian Barwick
7f460c88bf
doc: update "node check" examples
...
Also add example output for a standby.
2020-03-31 11:09:00 +09:00
Ian Barwick
e59da2d74e
node check: display upstream info before downstream info
...
It makes more sense that way.
2020-03-31 11:08:28 +09:00
Ian Barwick
bffb8fa11b
node check: handle --upstream option when node is primary
2020-03-31 10:49:30 +09:00
Ian Barwick
d9cb38c7f0
node check: add --upstream option
...
We have a --downstream option to check for attached nodes, but it
would be useful to have a corresponding --upstream option too.
A following patch will adapt the behaviour of this option when executed
on the primary node.
2020-03-30 17:54:52 +09:00
Ian Barwick
f3258c5002
cluster cleanup: explicitly log vacuum operation
2020-03-26 11:38:51 +09:00
Ian Barwick
5d92c99bb9
standby switchover: warn if no superuser connection available
2020-03-26 11:18:04 +09:00
Ian Barwick
6895916914
node service: explicitly note the node identity where CHECKPOINT issued
...
This output is logged during "standby switchover", so it's useful to be
aware of which node the activity is being performed on.
2020-03-25 14:00:55 +09:00
Ian Barwick
e64349e4da
standby switchover: accept -S/--superuser option
2020-03-25 14:00:51 +09:00
Ian Barwick
2e9bc31c8c
Consolidate code for establishing a superuser connection
2020-03-25 11:02:31 +09:00
Ian Barwick
325e3ea541
Update "repmgr node" help output
2020-03-25 09:37:49 +09:00