Commit Graph

1675 Commits

Author SHA1 Message Date
Ian Barwick
b8677a0fa2 docs: link to PostgreSQL roadmap 2020-08-06 10:01:40 +09:00
Ian Barwick
992d2e0e49 doc: update "repmgr witness register" description
Add missing "Options" section.
2020-08-06 10:01:37 +09:00
Ian Barwick
5c71809261 docs: reformat additonal config file upgrade notes into a new section
It's easier to link to the information that way.
2020-08-06 10:01:32 +09:00
Martín Marqués
22f2ee3050 doc: add two notes on section related to configuration files
Add notes to the documention mentioning that after postgres or repmgr
upgrades (postgres major upgrades), there are some changes that need
to be taken care of.

Signed-off-by: Martín Marqués <martin.marques@2ndquadrant.com>
2020-08-06 10:01:29 +09:00
Ian Barwick
2371f30f8a cluster matrix/crosscheck: improve text mode output formatting
Previously these actions were hard-wired to assume node IDs would only
ever have two digits at most.

Refactor to use the same table generation code as other actions, which
properly handles variable column sizes.
2020-07-06 14:26:20 +09:00
Ian Barwick
eddf06b60b node status: clarify "archive_mode" message on standbys
"archive_mode = 'always'" available from PostgreSQL 9.5.
2020-07-06 10:22:41 +09:00
Ian Barwick
b9874cd751 doc: clarify "node rejoin" usage
Emphasize that conninfo must be provided for a running node.
2020-07-06 09:57:48 +09:00
Ian Barwick
8313944535 node rejoin: remove unneeded PQfinish() 2020-06-10 11:58:23 +09:00
Ian Barwick
3bfaa8e722 doc: note downstream node (dis)connection monitoring in more places 2020-06-09 16:30:53 +09:00
Ian Barwick
ca42dd563b standby clone: fixes for Barman tablespace handling.
repmgr creates a file with a list of tablespace files to fetch from
Barman, however the file may not actually have been flushed to disk
at the point the rsync operation was executed, so may be incomplete
or empty.

Also fix handling of tablespace remapping.

Addresses GitHub #650.
2020-06-09 10:52:28 +09:00
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