1<appendix id="appendix-release-notes"> 2 <title>Release notes</title> 3 <indexterm> 4 <primary>Release notes</primary> 5 </indexterm> 6 7 <para> 8 Changes to each &repmgr; release are documented in the release notes. 9 Please read the release notes for all versions between 10 your current version and the version you are plan to upgrade to 11 before performing an upgrade, as there may be version-specific upgrade steps. 12 </para> 13 14 <para> 15 See also: <xref linkend="upgrading-repmgr"/> 16 </para> 17 18<!-- remember to update the release date in ../repmgr_version.h.in --> 19 20 <sect1 id="release-5.2.0"> 21 <title id="release-current">Release 5.2.0</title> 22 <para><emphasis>Thu 22 October, 2020</emphasis></para> 23 24 <para> 25 &repmgr; 5.2.0 is a major release. 26 </para> 27 <para> 28 This release provides support for <ulink url="https://www.postgresql.org/docs/13/release-13.html">PostgreSQL 13</ulink>, released in September 2020. 29 </para> 30 <para> 31 This release removes support for PostgreSQL 9.3, which was 32 <ulink url="https://www.postgresql.org/docs/9.3/release-9-3-25.html">designated EOL in November 2018</ulink>. 33 </para> 34 35 <sect2> 36 <title>General improvements</title> 37 <para> 38 <itemizedlist> 39 <listitem> 40 <para> 41 Configuration: support <command>include</command>, <command>include_dir</command> and 42 <command>include_if_exists</command> directives (see <xref linkend="configuration-file-include-directives"/>). 43 </para> 44 </listitem> 45 <listitem> 46 <para> 47 <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>: 48 Improve sanity check failure log output from the demotion candidate. 49 </para> 50 <para> 51 If database connection configuration is not consistent across all nodes, it's 52 possible remote &repmgr; invocations (e.g. during switchover, from the promotion candidate 53 to the demotion candidate) will not be able to connect to the database. This will 54 now be explicitly reported as a database connection failure, rather than as a failure 55 of the respective sanity check. 56 </para> 57 </listitem> 58 <listitem> 59 <para> 60 <link linkend="repmgr-cluster-crosscheck">repmgr cluster crosscheck</link> / 61 <link linkend="repmgr-cluster-matrix">repmgr cluster matrix</link>: 62 improve text mode output format, in particular so that node identifiers of arbitrary length are 63 displayed correctly. 64 </para> 65 </listitem> 66 67 <listitem> 68 <para> 69 <link linkend="repmgr-primary-unregister">repmgr primary unregister</link>: 70 the <option>--force</option> can be provided to unregister an active primary node, provided 71 it has no registered standby nodes. 72 </para> 73 </listitem> 74 75 <listitem> 76 <para> 77 <link linkend="repmgr-standby-clone">repmgr standby clone</link>: new option 78 <option>--verify-backup</option> to run PostgreSQL's 79 <ulink url="https://www.postgresql.org/docs/13/app-pgverifybackup.html">pg_verifybackup</ulink> 80 utility after cloning a standby to verify the integrity of the copied data 81 (PostgreSQL 13 and later). 82 </para> 83 </listitem> 84 85 <listitem> 86 <para> 87 <link linkend="repmgr-standby-clone">repmgr standby clone</link>: 88 when cloning from Barman, setting <option>--waldir</option> 89 (PostgreSQL 9.6 and earlier: <option>--xlogdir</option>) in 90 <option>pg_basebackup_options</option> will cause &repmgr; to create 91 a WAL directory outside of the main data directory and symlink 92 it from there, in the same way as would happen when cloning 93 using <application>pg_basebackup</application>. 94 </para> 95 </listitem> 96 97 <listitem> 98 <para> 99 <link linkend="repmgr-standby-follow">repmgr standby follow</link>: 100 In PostgreSQL 13 and later, a standby no longer requires a restart to 101 follow a new upstream node. 102 </para> 103 <para> 104 The old behaviour (always restarting the standby to follow a new node) 105 can be restored by setting the configuration file parameter 106 <varname>standby_follow_restart</varname> to <literal>true</literal>. 107 </para> 108 </listitem> 109 110 <listitem> 111 <para> 112 <link linkend="repmgr-node-rejoin">repmgr node rejoin</link>: 113 enable a node to attach to a target node even the target node 114 has a lower timeline (PostgreSQL 9.6 and later). 115 </para> 116 </listitem> 117 118 <listitem> 119 <para> 120 <link linkend="repmgr-node-rejoin">repmgr node rejoin</link>: 121 in PostgreSQL 13 and later, support <application>pg_rewind</application>'s 122 ability to automatically run crash recovery on a PostgreSQL instance 123 which was not shut down cleanly. 124 </para> 125 </listitem> 126 127 <listitem> 128 <para> 129 <link linkend="repmgr-node-check">repmgr node check</link>: 130 option <option>--db-connection</option> added to check if &repmgr; 131 can connect to the database on the local node. 132 </para> 133 </listitem> 134 <listitem> 135 <para> 136 <link linkend="repmgr-node-check">repmgr node check</link>: 137 report database connection error if the <option>--optformat</option> was provided. 138 </para> 139 </listitem> 140 <listitem> 141 <para> 142 Improve handling of pg_control read errors. 143 </para> 144 </listitem> 145 <listitem> 146 <para> 147 It is now possible to dump the contents of &repmgr; metadata tables with 148 <application>pg_dump</application>. 149 </para> 150 </listitem> 151 </itemizedlist> 152 </para> 153 </sect2> 154 <sect2> 155 <title>repmgrd enhancements</title> 156 <para> 157 <itemizedlist> 158 159 <listitem> 160 <para> 161 Following additional parameters can be provided to <varname>failover_validation_command</varname>: 162 <itemizedlist spacing="compact" mark="bullet"> 163 <listitem> 164 <simpara><literal>%n</literal>: node ID</simpara> 165 </listitem> 166 <listitem> 167 <simpara><literal>%a</literal>: node name</simpara> 168 </listitem> 169 <listitem> 170 <simpara><literal>%v</literal>: number of visible nodes</simpara> 171 </listitem> 172 <listitem> 173 <simpara><literal>%u</literal>: number of shared upstream nodes</simpara> 174 </listitem> 175 <listitem> 176 <simpara><literal>%t</literal>: total number of nodes</simpara> 177 </listitem> 178 </itemizedlist> 179 </para> 180 </listitem> 181 182 <listitem> 183 <para> 184 Configuration option <varname>always_promote</varname> (default: <literal>false</literal>) 185 to control whether a node should be promoted if the &repmgr; metadata is not up-to-date 186 on that node. 187 </para> 188 </listitem> 189 </itemizedlist> 190 </para> 191 </sect2> 192 193 <sect2> 194 <title>Bug fixes</title> 195 <para> 196 <itemizedlist> 197 <listitem> 198 <para> 199 <link linkend="repmgr-standby-clone">repmgr standby clone</link>: 200 fix issue with cloning from Barman where the tablespace mapping file was 201 not flushed to disk before attempting to retrieve files from Barman. GitHub #650. 202 </para> 203 </listitem> 204 <listitem> 205 <para> 206 <link linkend="repmgr-node-rejoin">repmgr node rejoin</link>: 207 ensure that when verifying a standby node has attached to its upstream, the 208 node has started streaming before confirming the success of the rejoin operation. 209 </para> 210 </listitem> 211 <listitem> 212 <para> 213 &repmgrd;: ensure primary connection is reset if same as upstream. GitHub #633. 214 </para> 215 </listitem> 216 </itemizedlist> 217 </para> 218 </sect2> 219 220 </sect1> 221 222 <sect1 id="release-5.1.0"> 223 <title>Release 5.1.0</title> 224 <para><emphasis>Mon 13 April, 2020</emphasis></para> 225 226 <para> 227 &repmgr; 5.1.0 is a major release. 228 </para> 229 <para> 230 For details on how to upgrade an existing &repmgr; installation, see 231 documentation section <link linkend="upgrading-major-version">Upgrading a major version release</link>. 232 </para> 233 <para> 234 If &repmgrd; is in use, a PostgreSQL restart <emphasis>is</emphasis> required; 235 in that case we suggest combining this &repmgr; upgrade with the next PostgreSQL 236 minor release, which will require a PostgreSQL restart in any case. 237 </para> 238 239 240 <sect2> 241 <title>Compatibility changes</title> 242 <para> 243 The <link linkend="repmgr-standby-clone"><command>repmgr standby clone</command></link> 244 <option>--recovery-conf-only</option> option has been renamed to 245 <option>--replication-conf-only</option>. <option>--recovery-conf-only</option> will 246 still be accepted as an alias. 247 </para> 248 </sect2> 249 250 <sect2> 251 <title>General improvements</title> 252 <para> 253 <itemizedlist> 254 255 <listitem> 256 <para> 257 The requirement that the &repmgr; user is a database superuser has been 258 removed as far as possible. 259 </para> 260 <para> 261 In theory, &repmgr; can be operated with a normal database user for managing 262 the &repmgr; database, and a separate replication user for managing replication 263 connections (and replication slots, if these are in use). 264 </para> 265 <para> 266 Some operations will still require superuser permissions, e.g. for issuing 267 a <command>CHECKPOINT</command> as par of a switchover operation; in this case 268 a valid superuser should be provided with the <option>-S</option>/<option>--superuser</option> 269 option. 270 </para> 271 </listitem> 272 273 <listitem> 274 <para> 275 <link linkend="repmgr-standby-clone"><command>repmgr standby clone</command></link>: 276 Warn if neither of data page checksums or <option>wal_log_hints</option> are active, 277 as this will preclude later usage of <command>pg_rewind</command>. 278 </para> 279 </listitem> 280 281 <listitem> 282 <para> 283 <link linkend="repmgr-standby-promote"><command>repmgr standby promote</command></link>: 284 when executed with <option>--dry-run</option>, the method which would be used to promote the node 285 will be displayed. 286 </para> 287 </listitem> 288 289 <listitem> 290 <para> 291 <link linkend="repmgr-standby-follow"><command>repmgr standby follow</command></link>: 292 Improve logging and checking of potential failure situations. 293 </para> 294 </listitem> 295 296 <listitem> 297 <para> 298 <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>: 299 Replication configuration files (PostgreSQL 11 and earlier: 300 <filename>recovery.conf</filename>; PostgreSQL 12 and later: <filename>postgresql.auto.conf</filename>) 301 will be checked to ensure they are owned by the same user who owns the PostgreSQL 302 data directory. 303 </para> 304 </listitem> 305 306 <listitem> 307 <para> 308 <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>: 309 Provide additional information in <option>--dry-run mode</option> output. 310 </para> 311 </listitem> 312 313 <listitem> 314 <para> 315 <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>: 316 Checks that the demotion candidate's registered repmgr.conf file can be found, to 317 prevent confusing references to an incorrectly configured data directory. GitHub 615. 318 </para> 319 </listitem> 320 321 <listitem> 322 <para> 323 <link linkend="repmgr-node-check"><command>repmgr node check</command></link>: 324 accept option <option>-S</option>/<option>--superuser</option>. GitHub #621. 325 </para> 326 </listitem> 327 328 <listitem> 329 <para> 330 <link linkend="repmgr-node-check"><command>repmgr node check</command></link>: 331 add <option>--upstream</option> option to check whether the node is attached 332 to the expected upstream node. 333 </para> 334 </listitem> 335 336 </itemizedlist> 337 </para> 338 </sect2> 339 340 <sect2> 341 <title>Bug fixes</title> 342 <para> 343 <itemizedlist> 344 <listitem> 345 <para> 346 Ensure <link linkend="repmgr-node-rejoin"><command>repmgr node rejoin</command></link> 347 checks for available replication slots on the rejoin target. 348 </para> 349 </listitem> 350 351 <listitem> 352 <para> 353 <link linkend="repmgr-standby-follow"><command>repmgr standby follow</command></link> and 354 <link linkend="repmgr-node-rejoin"><command>repmgr node rejoin</command></link> will now return 355 an error code if the operation fails if a replication slot is not available or cannot 356 be created on the follow/rejoin target. 357 </para> 358 </listitem> 359 360 361 <listitem> 362 <para> 363 <link linkend="repmgr-standby-promote"><command>repmgr standby promote</command></link>: 364 in <option>--dry-run mode</option>, display promote command which will be executed. 365 </para> 366 </listitem> 367 368 369 <listitem> 370 <para> 371 <link linkend="repmgr-standby-promote"><command>repmgr standby promote</command></link> 372 will check if the <literal>repmgr</literal> user has permission to execute 373 <function>pg_promote()</function> and fall back to <command>pg_ctl promote</command> if 374 necessary. 375 </para> 376 </listitem> 377 378 <listitem> 379 <para> 380 <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>: 381 check for demotion candidate reattachment as late as possible to avoid spurious failure 382 reports. 383 </para> 384 </listitem> 385 386 387 <listitem> 388 <para> 389 &repmgrd;: check for presence of <option>promote_command</option> and 390 <option>follow_command</option> on receipt of <literal>SIGHUP</literal>. GitHub 614. 391 </para> 392 </listitem> 393 394 <listitem> 395 <para> 396 Fix situation where replication connections were not created correctly, which 397 could lead to spurious replication connection failures in some situations, e.g. 398 where password files are used. 399 </para> 400 </listitem> 401 402 <listitem> 403 <para> 404 Ensure <filename>postgresql.auto.conf</filename> is created with 405 correct permissions (PostgreSQL 12 and later). 406 </para> 407 </listitem> 408 409 </itemizedlist> 410 </para> 411 </sect2> 412 413 </sect1> 414 415 <sect1 id="release-5.0"> 416 <title>Release 5.0</title> 417 <para><emphasis>Tue 15 October, 2019</emphasis></para> 418 419 <para> 420 &repmgr; 5.0 is a major release. 421 </para> 422 <para> 423 For details on how to upgrade an existing &repmgr; installation, see 424 documentation section <link linkend="upgrading-major-version">Upgrading a major version release</link>. 425 </para> 426 <para> 427 If &repmgrd; is in use, a PostgreSQL restart <emphasis>is</emphasis> required; 428 in that case we suggest combining this &repmgr; upgrade with the next PostgreSQL 429 minor release, which will require a PostgreSQL restart in any case. 430 </para> 431 432 433 <sect2> 434 <title>Compatibility changes</title> 435 436 <sect3 id="repmgr-5-0-config-file-parsing"> 437 <title>Configuration file parsing has been made stricter</title> 438 <para> 439 &repmgr; now parses <link linkend="configuration-file-format">configuration files</link> 440 in the same way that PostgreSQL itself does, which means some files used with 441 earlier &repmgr; versions may need slight modification before they can be used 442 with &repmgr; 5 and later. 443 </para> 444 <para> 445 The main change is that string parameters should always be enclosed in single quotes. 446 </para> 447 <para> 448 For example, in &repmgr; 4.4 and earlier, the following <filename>repmgr.conf</filename> 449 entry was valid: 450 <programlisting> 451conninfo=host=node1 user=repmgr dbname=repmgr connect_timeout=2</programlisting> 452 This must now be changed to: 453 <programlisting> 454conninfo='host=node1 user=repmgr dbname=repmgr connect_timeout=2'</programlisting> 455 </para> 456 <para> 457 Note that simple string identifiers (e.g. <literal>node_name=node1</literal>) 458 may remain unquoted, though we recommend always enclosing 459 strings in single quotes. 460 </para> 461 <para> 462 Additionally, leading/trailing white space between single quotes will no longer 463 be trimmed; the entire string between single quotes will be 464 taken literally. 465 </para> 466 <para> 467 Strings enclosed in double quotes (e.g. <literal>node_name="node1"</literal>) 468 will now be rejected; previously they were accepted, but the double quotes were 469 interpreted as part of the string, which was a frequent cause of confusion. 470 </para> 471 <para> 472 This syntax matches that used by PostgreSQL itself. 473 </para> 474 </sect3> 475 476 <sect3> 477 <title>Some "repmgr daemon ..." commands renamed</title> 478 479 <para> 480 Some "<command>repmgr daemon ...</command>" commands have been renamed to 481 "<command>repmgr service ...</command>" as they have a cluster-wide effect 482 and to avoid giving the impression they affect only the local &repmgr; daemon. 483 </para> 484 <para> 485 The following commands are affected: 486 487 <itemizedlist spacing="compact" mark="bullet"> 488 489 <listitem> 490 <simpara> 491 <command>repmgr daemon pause</command> 492 (now <link linkend="repmgr-service-pause"><command>repmgr service pause</command></link>) 493 </simpara> 494 </listitem> 495 496 <listitem> 497 <simpara> 498 <command>repmgr daemon unpause</command> 499 (now <link linkend="repmgr-service-unpause"><command>repmgr service unpause</command></link>) 500 </simpara> 501 </listitem> 502 503 <listitem> 504 <simpara> 505 <command>repmgr daemon status</command> 506 (now <link linkend="repmgr-service-status"><command>repmgr service status</command></link>) 507 </simpara> 508 </listitem> 509 510 </itemizedlist> 511 </para> 512 <para> 513 The "<command>repmgr daemon ...</command>" form will still be accepted 514 for backwards compatibility. 515 </para> 516 </sect3> 517 518 <sect3> 519 <title>Some deprecated command line options removed</title> 520 <para> 521 The following command line options, which have been deprecated since &repmgr; 3.3 522 (and which no longer had any effect other than to generate a warning about their use) 523 have been removed: 524 <itemizedlist spacing="compact" mark="bullet"> 525 526 <listitem> 527 <simpara><option>--data-dir</option></simpara> 528 </listitem> 529 530 <listitem> 531 <simpara><option>--no-conninfo-password</option></simpara> 532 </listitem> 533 534 <listitem> 535 <simpara><option>--recovery-min-apply-delay</option></simpara> 536 </listitem> 537 538 </itemizedlist> 539 </para> 540 </sect3> 541 542 </sect2> 543 544 <sect2> 545 <title>General enhancements</title> 546 <para> 547 <itemizedlist> 548 <listitem> 549 <para> 550 Support for PostgreSQL 12 added. 551 </para> 552 <para> 553 Beginning with PostgreSQL 12, replication configuration has been integrated 554 into the main PostgreSQL configuraton system and the conventional 555 <filename>recovery.conf</filename> file is no longer valid. 556 </para> 557 <para> 558 &repmgr; has been modified to be compatible with this change. 559 </para> 560 <para> 561 &repmgr; additionally takes advantage of the new <command>pg_promote()</command> 562 function, which enables a standby to be promoted to primary using an SQL 563 command. 564 </para> 565 <para> 566 For an overview of general changes to replication configuration, see this blog entry: 567 <ulink url="https://www.2ndquadrant.com/en/blog/replication-configuration-changes-in-postgresql-12/">Replication configuration changes in PostgreSQL 12</ulink> 568 </para> 569 </listitem> 570 571 572 <listitem> 573 <para> 574 The &repmgr; configuration file is now parsed using 575 <command>flex</command>, meaning it will be parsed in 576 the same way as PostgreSQL parses its own configuration 577 files. 578 </para> 579 <para> 580 This makes configuration file parsing more robust 581 and consistent. 582 </para> 583 <para> 584 See item <link linkend="repmgr-5-0-config-file-parsing">Configuration file parsing has been made stricter</link> 585 for details. 586 </para> 587 </listitem> 588 589 <listitem> 590 <para> 591 <link linkend="repmgr-standby-clone"><command>repmgr standby clone</command></link>: 592 checks for availability of the &repmgr; extension on the upstream node have 593 been improved and error messages improved. 594 </para> 595 </listitem> 596 597 <listitem> 598 <para> 599 When executing &repmgr; remotely, if the &repmgr; log level was explicitly 600 provided (with <option>-L</option>/<option>--log-level</option>), that log level 601 will be passed to the remote &repmgr;. 602 </para> 603 <para> 604 This makes it possible to return log output when executing repmgr 605 remotely at a different level to the one defined in the remote 606 &repmgr;'s <filename>repmgr.conf</filename>. 607 </para> 608 <para> 609 This is particularly useful when <literal>DEBUG</literal> output is required. 610 </para> 611 </listitem> 612 </itemizedlist> 613 </para> 614 </sect2> 615 616 <sect2> 617 <title>Bug fixes</title> 618 <para> 619 <itemizedlist> 620 <listitem> 621 <para> 622 Check role membership when trying to read <literal>pg_settings</literal>. 623 </para> 624 <para> 625 Previously &repmgr; assumed only superusers could read <literal>pg_settings</literal>, 626 but from PostgreSQL 10, all members of the roles <literal>pg_read_all_settings</literal> 627 or <literal>pg_monitor</literal> are permitted to do this as well. 628 </para> 629 </listitem> 630 631 <listitem> 632 <para> 633 &repmgrd;: Fix handling of upstream node change check. 634 </para> 635 <para> 636 &repmgrd; has a check to see if the upstream node has unexpectedly 637 changed, e.g. if the repmgrd service is paused and the PostgreSQL 638 instance has been pointed to another node. 639 </para> 640 <para> 641 However this check was relying on the node record on the local node 642 being up-to-date, which may not be the case immediately after a 643 failover, when the node is still replaying records updated prior 644 to the node's own record being updated. In this case it will 645 mistakenly assume the node is following the original primary 646 and attempt to restart monitoring, which will fail as the original 647 primary is no longer available. 648 </para> 649 <para> 650 To prevent this, the node's record on the upstream node is checked 651 to see if the reported upstream <literal>node_id</literal> matches 652 the expected <literal>node_id</literal>. GitHub #587/#588. 653 </para> 654 </listitem> 655 </itemizedlist> 656 </para> 657 658 </sect2> 659 </sect1> 660 661 <sect1 id="release-4.4"> 662 <title>Release 4.4</title> 663 <para><emphasis>Thu 27 June, 2019</emphasis></para> 664 665 <para> 666 &repmgr; 4.4 is a major release. 667 </para> 668 <para> 669 For details on how to upgrade an existing &repmgr; installation, see 670 documentation section <link linkend="upgrading-major-version">Upgrading a major version release</link>. 671 </para> 672 <para> 673 If &repmgrd; is in use, a PostgreSQL restart <emphasis>is</emphasis> required; 674 in that case we suggest combining this &repmgr; upgrade with the next PostgreSQL 675 minor release, which will require a PostgreSQL restart in any case. 676 </para> 677 678 679 <important> 680 <para> 681 On Debian-based systems, including Ubuntu, if using &repmgrd; 682 please ensure that in the file <filename>/etc/init.d/repmgrd</filename>, the parameter 683 <varname>REPMGRD_OPTS</varname> contains "<literal>--daemonize=false</literal>", e.g.: 684 <programlisting> 685# additional options 686REPMGRD_OPTS="--daemonize=false"</programlisting> 687 </para> 688 <para> 689 For further details, see <link linkend="repmgrd-configuration-debian-ubuntu">repmgrd configuration on Debian/Ubuntu</link>. 690 </para> 691 </important> 692 693 <sect2> 694 <title>repmgr client enhancements</title> 695 <para> 696 <itemizedlist> 697 698 <listitem> 699 <para> 700 <link linkend="repmgr-standby-clone"><command>repmgr standby clone</command></link>: 701 prevent a standby from being cloned from a witness server (PostgreSQL 9.6 and later only). 702 </para> 703 </listitem> 704 705 <listitem> 706 <para> 707 <link linkend="repmgr-witness-register"><command>repmgr witness register</command></link>: 708 prevent a witness server from being registered on the replication cluster primary server 709 (PostgreSQL 9.6 and later only). 710 </para> 711 <para> 712 Registering a witness on the primary node would defeat the purpose of having a witness server, 713 which is intended to remain running even if the cluster's primary goes down. 714 </para> 715 </listitem> 716 717 <listitem> 718 <para> 719 <link linkend="repmgr-standby-follow"><command>repmgr standby follow</command></link>: 720 note that an active, reachable cluster primary is required for this command; 721 and provide a more helpful error message if no reachable primary could be found. 722 </para> 723 </listitem> 724 725 <listitem> 726 <para> 727 &repmgr;: when executing <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>, 728 if <option>--siblings-follow</option> is not supplied, list all nodes which repmgr considers 729 to be siblings (this will include the witness server, if in use), and 730 which will remain attached to the old primary. 731 </para> 732 </listitem> 733 734 <listitem> 735 <para> 736 &repmgr;: when executing <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>, 737 ignore nodes which are unreachable and marked as inactive. 738 Previously it would abort if any node was unreachable, 739 as that means it was unable to check if repmgrd is running. 740 </para> 741 <para> 742 However if the node has been marked as inactive in the repmgr metadata, it's 743 reasonable to assume the node is no longer part of the replication cluster 744 and does not need to be checked. 745 </para> 746 </listitem> 747 748 <listitem> 749 <para> 750 <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link> 751 and <link linkend="repmgr-standby-promote"><command>repmgr standby promote</command></link>: 752 when executing with the <option>--dry-run</option> option, continue checks as far as possible 753 even if errors are encountered. 754 </para> 755 </listitem> 756 757 <listitem> 758 <para> 759 <link linkend="repmgr-standby-promote"><command>repmgr standby promote</command></link>: 760 add <option>--siblings-follow</option> (similar to 761 <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>). 762 </para> 763 <note> 764 <para> 765 If using &repmgrd;, when invoking 766 <command>repmgr standby promote</command> (either directly via 767 the <option>promote_command</option>, or in a script called 768 via <option>promote_command</option>), <option>--siblings-follow</option> 769 <emphasis>must not</emphasis> be included as a 770 command line option for <link linkend="repmgr-standby-promote"><command>repmgr standby promote</command></link>. 771 </para> 772 </note> 773 </listitem> 774 775 <listitem> 776 <para> 777 <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>: 778 add <option>--repmgrd-force-unpause</option> to unpause all &repmgrd; instances after executing a switchover. 779 This will ensure that any &repmgrd; instances which were paused before the switchover will be 780 unpaused. 781 </para> 782 </listitem> 783 784 <listitem> 785 <para> 786 <link linkend="repmgr-service-status"><command>repmgr daemon status</command></link>: 787 make output similar to that of 788 <link linkend="repmgr-cluster-show"><command>repmgr cluster show</command></link> 789 for consistency and to make it easier to identify nodes not in the expected 790 state. 791 </para> 792 </listitem> 793 794 <listitem> 795 <para> 796 <link linkend="repmgr-cluster-show"><command>repmgr cluster show</command></link>: 797 display each node's timeline ID (PostgreSQL 9.6 and later only). 798 </para> 799 </listitem> 800 801 <listitem> 802 <para> 803 <link linkend="repmgr-cluster-show"><command>repmgr cluster show</command></link> 804 and <link linkend="repmgr-service-status"><command>repmgr daemon status</command></link>: 805 show the upstream node name as reported by each individual node - this helps visualise 806 situations where the cluster is in an unexpected state, and provide a better idea of the 807 actual cluster state. 808 </para> 809 <para> 810 For example, if a cluster has divided somehow and a set of nodes are 811 following a new primary, when running either of these commands, &repmgr; 812 will now show the name of the primary those nodes are actually 813 following, rather than the now outdated node name recorded 814 on the other side of the "split". A warning will also be issued 815 about the unexpected situation. 816 </para> 817 </listitem> 818 819 <listitem> 820 <para> 821 <link linkend="repmgr-cluster-show"><command>repmgr cluster show</command></link> 822 and <link linkend="repmgr-service-status"><command>repmgr daemon status</command></link>: 823 check if a node is attached to its advertised upstream node, and issue a 824 warning if the node is not attached. 825 </para> 826 </listitem> 827 828 </itemizedlist> 829 </para> 830 </sect2> 831 832 <sect2> 833 <title>repmgrd enhancements</title> 834 <para> 835 <itemizedlist> 836 837 <listitem> 838 <para> 839 On the primary node, &repmgrd; is now able to monitor standby connections and, 840 if the number of nodes connected falls below a certain (configurable) value, 841 execute a custom script. 842 </para> 843 <para> 844 This provided an additional method for fencing an isolated primary node, and/or taking 845 other action if one or more standys become disconnected. 846 </para> 847 <para> 848 See section <link linkend="repmgrd-primary-child-disconnection">Monitoring standby disconnections on the primary node</link> 849 for more details. 850 </para> 851 </listitem> 852 853 <listitem> 854 <para> 855 In a failover situation, &repmgrd; nodes on the standbys of the failed primary 856 are now able confirm among themselves that none can still see the primary 857 before continuing with the failover. 858 </para> 859 <para> 860 The <filename>repmgr.conf</filename> option <option>primary_visibility_consensus</option> must 861 be set to <literal>true</literal> to enable this functionality. 862 </para> 863 <para> 864 See section <xref linkend="repmgrd-primary-visibility-consensus"/> 865 for more details. 866 </para> 867 </listitem> 868 </itemizedlist> 869 </para> 870 </sect2> 871 872 <sect2> 873 <title>Bug fixes</title> 874 <para> 875 <itemizedlist> 876 <listitem> 877 <para> 878 Ensure BDR2-specific functionality cannot be used on BDR3 and later. 879 </para> 880 <para> 881 The BDR support present in &repmgr; is for specific BDR2 use cases. 882 </para> 883 </listitem> 884 885 <listitem> 886 <para> 887 &repmgr;: when executing <link linkend="repmgr-standby-clone"><command>repmgr standby clone</command></link> 888 in <option>--dry-run</option> mode, ensure provision of the <option>--force</option> option 889 does not result in an existing data directory being modified in any way. 890 </para> 891 </listitem> 892 893 <listitem> 894 <para> 895 &repmgr;: when executing <link linkend="repmgr-primary-register"><command>repmgr primary register</command></link> 896 with the <option>--force</option> option, if another primary record exists but the associated node is 897 unreachable (or running as a standby), set that node's record to inactive to enable the current node 898 to be registered as a primary. 899 </para> 900 </listitem> 901 902 <listitem> 903 <para> 904 &repmgr;: when executing <link linkend="repmgr-standby-clone"><command>repmgr standby clone</command></link> 905 with the <option>--upstream-conninfo</option>, ensure that <varname>application_name</varname> 906 is set correctly in <varname>primary_conninfo</varname>. 907 </para> 908 </listitem> 909 910 <listitem> 911 <para> 912 &repmgr;: when executing <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>, 913 don't abort if one or more nodes are not reachable <emphasis>and</emphasis> 914 they are marked as inactive. 915 </para> 916 </listitem> 917 918 <listitem> 919 <para> 920 &repmgr;: canonicalize the data directory path when parsing the configuration file, so 921 the provided path matches the path PostgreSQL reports as its data directory. 922 Otherwise, if e.g. the data directory is configured with a trailing slash, 923 <link linkend="repmgr-node-check"><command>repmgr node check --data-directory-config</command></link> 924 will return a spurious error. 925 </para> 926 </listitem> 927 928 <listitem> 929 <para> 930 &repmgrd;: fix memory leak which occurs while the monitored PostgreSQL node is <emphasis>not</emphasis> 931 running. 932 </para> 933 </listitem> 934 935 </itemizedlist> 936 </para> 937 </sect2> 938 939 940 <sect2> 941 <title>Other</title> 942 <para> 943 <itemizedlist> 944 <listitem> 945 <para> 946 The &repmgr; documentation has been converted to DocBook XML format, 947 as currently used by the main PostgreSQL project. 948 This means it can now be built against any PostgreSQL version from 9.5 949 (previously it was not possible to build the documentation against 950 PostgreSQL 10 or later), and makes it easier to provide the documentation 951 in other formats such as PDF. 952 </para> 953 <para> 954 For further details see: <xref linkend="installation-build-repmgr-docs"/> 955 </para> 956 </listitem> 957 </itemizedlist> 958 </para> 959 </sect2> 960 </sect1> 961 962 963 <sect1 id="release-4.3"> 964 <title>Release 4.3</title> 965 <para><emphasis>Tue April 2, 2019</emphasis></para> 966 <para> 967 &repmgr; 4.3 is a major release. 968 </para> 969 <para> 970 For details on how to upgrade an existing &repmgr; installation, see 971 documentation section <link linkend="upgrading-major-version">Upgrading a major version release</link>. 972 </para> 973 <para> 974 If &repmgrd; is in use, a PostgreSQL restart <emphasis>is</emphasis> required; 975 in that case we suggest combining this &repmgr; upgrade with the next PostgreSQL 976 minor release, which will require a PostgreSQL restart in any case. 977 </para> 978 979 980 <important> 981 <para> 982 On Debian-based systems, including Ubuntu, if using &repmgrd; 983 please ensure that in the file <filename>/etc/init.d/repmgrd</filename>, the parameter 984 <varname>REPMGRD_OPTS</varname> contains "<literal>--daemonize=false</literal>", e.g.: 985 <programlisting> 986# additional options 987REPMGRD_OPTS="--daemonize=false"</programlisting> 988 </para> 989 <para> 990 For further details, see <link linkend="repmgrd-configuration-debian-ubuntu">repmgrd configuration on Debian/Ubuntu</link>. 991 </para> 992 </important> 993 994 <sect2> 995 <title>repmgr client enhancements</title> 996 <para> 997 <itemizedlist> 998 999 <listitem> 1000 <para> 1001 <link linkend="repmgr-standby-follow"><command>repmgr standby follow</command></link>: 1002 option <option>--upstream-node-id</option> can now be used to specify another standby 1003 to follow. 1004 </para> 1005 </listitem> 1006 1007 <listitem> 1008 <para> 1009 <link linkend="repmgr-standby-follow"><command>repmgr standby follow</command></link>: 1010 verify that it is actually possible to follow another node. 1011 </para> 1012 </listitem> 1013 1014 <listitem> 1015 <para> 1016 <link linkend="repmgr-node-rejoin"><command>repmgr node rejoin</command></link>: 1017 verify that it is actually possible to attach the node to the current primary. 1018 </para> 1019 </listitem> 1020 1021 <listitem> 1022 <para> 1023 New commands <link linkend="repmgr-daemon-start"><command>repmgr daemon start</command></link> and 1024 <link linkend="repmgr-daemon-stop"><command>repmgr daemon stop</command></link>: 1025 these provide a standardized way of starting and stopping &repmgrd;. 1026 GitHub #528. 1027 </para> 1028 <note> 1029 <para> 1030 These commands require the configuration file settings 1031 <varname>repmgrd_service_start_command</varname> and <varname>repmgrd_service_stop_command</varname> 1032 in <filename>repmgr.conf</filename> to be set. 1033 </para> 1034 </note> 1035 </listitem> 1036 1037 <listitem> 1038 <para> 1039 <link linkend="repmgr-service-status"><command>repmgr daemon status</command></link> 1040 additionally displays the node priority and the interval (in seconds) since the 1041 &repmgrd; instance last verified its upstream node was available. 1042 </para> 1043 </listitem> 1044 1045 <listitem> 1046 <para> 1047 Add <option>--compact</option> option to <command><link linkend="repmgr-cluster-show">repmgr cluster show</link></command> (GitHub #521). 1048 </para> 1049 <para> 1050 This makes it easier to copy the output into emails, chats etc. as a compact table. 1051 </para> 1052 </listitem> 1053 1054 <listitem> 1055 <para> 1056 <command><link linkend="repmgr-cluster-show">repmgr cluster show</link></command>: 1057 differentiate between unreachable nodes and nodes which are running but rejecting connections. 1058 </para> 1059 <para> 1060 This makes it possible to see whether a node is unreachable at network level, 1061 or if it is running but rejecting connections for some reason. 1062 </para> 1063 </listitem> 1064 1065 1066 <listitem> 1067 <para> 1068 Add <option>--dry-run</option> to <command><link linkend="repmgr-standby-promote">repmgr standby promote</link></command> (GitHub #522). 1069 </para> 1070 </listitem> 1071 1072 <listitem> 1073 <para> 1074 <command>repmgr --version-number</command> outputs the "raw" 1075 repmgr version number (e.g. <literal>40300</literal>). This is intended 1076 for use by scripts etc. requiring an easily parseable representation 1077 of the &repmgr; version. 1078 </para> 1079 </listitem> 1080 1081 <listitem> 1082 <para> 1083 <link linkend="repmgr-node-check"><command>repmgr node check --data-directory-config</command></link> 1084 option added; this is to confirm &repmgr; is correctly configured. GitHub #523. 1085 </para> 1086 </listitem> 1087 1088 <listitem> 1089 <para> 1090 Add check to <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link> 1091 to ensure the data directory on the demotion candidate is configured correctly in <filename>repmgr.conf</filename>. 1092 This is to ensure that &repmgr;, when remotely executed on the demotion candidate, can correctly verify 1093 that PostgreSQL on the demotion candidate was shut down cleanly. GitHub #523. 1094 </para> 1095 </listitem> 1096 1097 1098 </itemizedlist> 1099 </para> 1100 </sect2> 1101 1102 <sect2> 1103 <title>repmgrd enhancements</title> 1104 <para> 1105 <itemizedlist> 1106 1107 <listitem> 1108 <para> 1109 &repmgrd; will no longer consider nodes where &repmgrd; 1110 is not running as promotion candidates. 1111 </para> 1112 <para> 1113 Previously, if &repmgrd; was not running on a node, but 1114 that node qualified as the promotion candidate, it would never be promoted due to 1115 the absence of a running &repmgrd;. 1116 </para> 1117 </listitem> 1118 1119 <listitem> 1120 <para> 1121 Add option <option>connection_check_type</option> to enable selection of the method 1122 &repmgrd; uses to determine whether the upstream node is available. 1123 </para> 1124 <para> 1125 Possible values are <literal>ping</literal> (default; uses <command>PQping()</command> to 1126 determine server availability), <literal>connection</literal> (attempst to make a new connection to 1127 the upstream node), and <literal>query</literal> (determines server availability 1128 by executing an SQL statement on the node via the existing connection). 1129 </para> 1130 </listitem> 1131 1132 <listitem> 1133 <para> 1134 New configuration option <link linkend="repmgrd-failover-validation"><option>failover_validation_command</option></link> 1135 to allow an external mechanism to validate the failover decision made by &repmgrd;. 1136 </para> 1137 </listitem> 1138 1139 <listitem> 1140 <para> 1141 New configuration option <link linkend="repmgrd-standby-disconnection-on-failover"><option>standby_disconnect_on_failover</option></link> 1142 to force standbys to disconnect their WAL receivers before making a failover decision. 1143 </para> 1144 </listitem> 1145 1146 <listitem> 1147 <para> 1148 In a failover situation, &repmgrd; will not attempt to promote a 1149 node if another primary has already appeared (e.g. by being promoted manually). 1150 GitHub #420. 1151 </para> 1152 </listitem> 1153 1154 </itemizedlist> 1155 </para> 1156 </sect2> 1157 1158 <sect2> 1159 <title>Bug fixes</title> 1160 <para> 1161 <itemizedlist> 1162 1163 <listitem> 1164 <para> 1165 <command><link linkend="repmgr-cluster-show">repmgr cluster show</link></command>: 1166 fix display of node IDs with multiple digits. 1167 </para> 1168 </listitem> 1169 1170 <listitem> 1171 <para> 1172 ensure <command><link linkend="repmgr-primary-unregister">repmgr primary unregister</link></command> 1173 behaves correctly when executed on a witness server. GitHub #548. 1174 </para> 1175 </listitem> 1176 1177 <listitem> 1178 <para> 1179 ensure <command><link linkend="repmgr-standby-register">repmgr standby register</link></command> 1180 fails when <option>--upstream-node-id</option> is the same as the local node ID. 1181 </para> 1182 </listitem> 1183 1184 <listitem> 1185 <para> 1186 &repmgr;: when executing <link linkend="repmgr-standby-clone"><command>repmgr standby clone</command></link>, 1187 recheck primary/upstream connection(s) after the data copy operation is complete, as these may 1188 have gone away. 1189 </para> 1190 </listitem> 1191 1192 <listitem> 1193 <para> 1194 &repmgr;: when executing <command><link linkend="repmgr-standby-switchover">repmgr standby switchover</link></command>, 1195 prevent escaping issues with connection URIs when executing <command><link linkend="repmgr-node-rejoin">repmgr node rejoin</link></command> 1196 on the demotion candidate. GitHub #525. 1197 </para> 1198 </listitem> 1199 1200 <listitem> 1201 <para> 1202 &repmgr;: when executing <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>, 1203 verify the standby (promotion candidate) is currently attached to the primary (demotion candidate). GitHub #519. 1204 </para> 1205 </listitem> 1206 1207 <listitem> 1208 <para> 1209 &repmgr;: when executing <link linkend="repmgr-standby-switchover"><command>repmgr standby switchover</command></link>, 1210 avoid a potential race condition when comparing received WAL on the standby to the primary's shutdown location, 1211 as the standby's walreceiver may not have yet flushed all received WAL to disk. GitHub #518. 1212 </para> 1213 </listitem> 1214 1215 <listitem> 1216 <para> 1217 &repmgr;: when executing <command><link linkend="repmgr-witness-register">repmgr witness register</link></command>, 1218 check the node to connected is actually the primary (i.e. not the witness server). GitHub #528. 1219 </para> 1220 </listitem> 1221 1222 <listitem> 1223 <para> 1224 <command><link linkend="repmgr-node-check">repmgr node check</link></command> 1225 will only consider physical replication slots, as the purpose 1226 of slot checks is to warn about potential issues with 1227 streaming replication standbys which are no longer attached. 1228 </para> 1229 </listitem> 1230 1231 <listitem> 1232 <para> 1233 &repmgrd;: on a cascaded standby, don't fail over if 1234 <literal>failover=manual</literal>. GitHub #531. 1235 </para> 1236 </listitem> 1237 1238 </itemizedlist> 1239 </para> 1240 </sect2> 1241 1242 </sect1> 1243 1244 <sect1 id="release-4.2"> 1245 <title>Release 4.2</title> 1246 <para><emphasis>Wed October 24, 2018</emphasis></para> 1247 1248 <para> 1249 &repmgr; 4.2 is a major release, with the main new feature being the 1250 ability to <link linkend="repmgrd-pausing">pause repmgrd</link>, e.g. during planned maintenance 1251 operations. Various other usability enhancements and a couple of bug fixes are also included; 1252 see notes below for details. 1253 </para> 1254 <para> 1255 A restart of the PostgreSQL server <emphasis>is</emphasis> required 1256 for this release. For detailed upgrade instructions, see 1257 <link linkend="upgrading-major-version">Upgrading a major version release</link>. 1258 </para> 1259 1260 <important> 1261 <para> 1262 On Debian-based systems, including Ubuntu, if using &repmgrd; 1263 please ensure that the in the file <filename>/etc/init.d/repmgrd</filename>, the parameter 1264 <varname>REPMGRD_OPTS</varname> contains "<literal>--daemonize=false</literal>", e.g.: 1265 <programlisting> 1266# additional options 1267REPMGRD_OPTS="--daemonize=false"</programlisting> 1268 </para> 1269 <para> 1270 For further details, see <link linkend="repmgrd-configuration-debian-ubuntu">repmgrd daemon configuration on Debian/Ubuntu</link>. 1271 </para> 1272 </important> 1273 1274 <sect2> 1275 <title>Configuration file changes</title> 1276 <para> 1277 <itemizedlist> 1278 <listitem> 1279 <para> 1280 New parameter <varname>shutdown_check_timeout</varname> (default: 60 seconds) added; 1281 this provides an explicit timeout for 1282 <command><link linkend="repmgr-standby-switchover">repmgr standby switchover</link></command> 1283 to check that the demotion candidate (current primary) has shut down. Previously, the parameters 1284 <literal>reconnect_attempts</literal> and <literal>reconnect_interval</literal> 1285 were used to calculate a timeout, but these are actually 1286 intended for primary failure detection. (GitHub #504). 1287 </para> 1288 </listitem> 1289 </itemizedlist> 1290 1291 <itemizedlist> 1292 <listitem> 1293 <para> 1294 New parameter <varname>repmgr_bindir</varname> added, to facilitate remote invocation of repmgr 1295 when the repmgr binary is located somewhere other than the PostgreSQL binary directory, as it 1296 cannot be assumed all package maintainers will install &repmgr; there. 1297 </para> 1298 <para> 1299 This parameter is optional; if not set (the default), &repmgr; will fall back 1300 to <option>pg_bindir</option> (if set). 1301 </para> 1302 <para> 1303 (GitHub #246). 1304 </para> 1305 </listitem> 1306 </itemizedlist> 1307 </para> 1308 1309 </sect2> 1310 1311 <sect2> 1312 <title>repmgr enhancements</title> 1313 <para> 1314 <itemizedlist> 1315 1316 <listitem> 1317 <para> 1318 <command><link linkend="repmgr-cluster-cleanup">repmgr cluster cleanup</link></command> 1319 now accepts the <option>--node-id</option> option to delete records for only one 1320 node. (GitHub #493). 1321 </para> 1322 </listitem> 1323 1324 <listitem> 1325 <para> 1326 When running 1327 <command><link linkend="repmgr-cluster-matrix">repmgr cluster matrix</link></command> and 1328 <command><link linkend="repmgr-cluster-crosscheck">repmgr cluster crosscheck</link></command>, 1329 &repmgr; will report nodes unreachable via SSH, and emit return code <literal>ERR_BAD_SSH</literal>. 1330 (GitHub #246). 1331 </para> 1332 <note> 1333 <para> 1334 Users relying on 1335 <command><link linkend="repmgr-cluster-crosscheck">repmgr cluster crosscheck</link></command> 1336 to return a non-zero return code as a way of detecting connectivity errors should be aware 1337 that <literal>ERR_BAD_SSH</literal> will be returned if there is an SSH connection error 1338 from the node where the command is executed, even if the command is able to establish 1339 that PostgreSQL connectivity is fine. Therefore the exact return code should be checked 1340 to determine what kind of connectivity error has been detected. 1341 </para> 1342 </note> 1343 </listitem> 1344 1345 </itemizedlist> 1346 </para> 1347 </sect2> 1348 1349 1350 <sect2> 1351 <title>repmgrd enhancements</title> 1352 <para> 1353 <itemizedlist> 1354 1355 <listitem> 1356 <para> 1357 &repmgrd; can now be "paused", i.e. instructed 1358 not to take any action such as a failover, even if the prerequisites for such an 1359 action are detected. 1360 </para> 1361 <para> 1362 This removes the need to stop &repmgrd; on all nodes when 1363 performing a planned operation such as a switchover. 1364 </para> 1365 <para> 1366 For further details, see <link linkend="repmgrd-pausing">Pausing repmgrd</link>. 1367 </para> 1368 </listitem> 1369 1370 </itemizedlist> 1371 </para> 1372 </sect2> 1373 1374 <sect2> 1375 <title>Bug fixes</title> 1376 <para> 1377 <itemizedlist> 1378 1379 <listitem> 1380 <para> 1381 &repmgr;: fix "Missing replication slots" label in 1382 <command><link linkend="repmgr-node-check">repmgr node check</link></command>. (GitHub #507) 1383 </para> 1384 </listitem> 1385 1386 <listitem> 1387 <para> 1388 &repmgrd;: fix parsing of <option>-d/--daemonize</option> option. 1389 </para> 1390 </listitem> 1391 1392 </itemizedlist> 1393 </para> 1394 </sect2> 1395 </sect1> 1396 1397 <sect1 id="release-4.1.1"> 1398 <title>Release 4.1.1</title> 1399 <para><emphasis>Wed September 5, 2018</emphasis></para> 1400 <para> 1401 repmgr 4.1.1 contains a number of usability enhancements and bug fixes. 1402 </para> 1403 <para> 1404 We recommend upgrading to this version as soon as possible. 1405 This release can be installed as a simple package upgrade from repmgr 4.0 ~ 4.1.0; 1406 &repmgrd; (if running) should be restarted. 1407 See <xref linkend="upgrading-repmgr"/> for more details. 1408 </para> 1409 1410 <sect2> 1411 <title>repmgr enhancements</title> 1412 <para> 1413 <itemizedlist> 1414 1415 <listitem> 1416 <para> 1417 <command><link linkend="repmgr-standby-switchover">repmgr standby switchover --dry-run</link></command> 1418 no longer copies external configuration files to test they can be copied; this avoids making 1419 any changes to the target system. (GitHub #491). 1420 </para> 1421 </listitem> 1422 1423 <listitem> 1424 <para> 1425 <command><link linkend="repmgr-cluster-cleanup">repmgr cluster cleanup</link></command>: 1426 add <literal>cluster_cleanup</literal> event. (GitHub #492). 1427 </para> 1428 </listitem> 1429 1430 <listitem> 1431 <para> 1432 <command><link linkend="repmgr-standby-switchover">repmgr standby switchover</link></command>: 1433 improve detection of free walsenders. (GitHub #495). 1434 </para> 1435 </listitem> 1436 1437 <listitem> 1438 <para> 1439 Improve messages emitted during 1440 <command><link linkend="repmgr-standby-promote">repmgr standby promote</link></command>. 1441 </para> 1442 </listitem> 1443 1444 </itemizedlist> 1445 </para> 1446 </sect2> 1447 1448 1449 <sect2> 1450 <title>repmgrd enhancements</title> 1451 <para> 1452 <itemizedlist> 1453 1454 <listitem> 1455 <para> 1456 Always reopen the log file after 1457 receiving <literal>SIGHUP</literal>. Previously this only happened if 1458 a configuration file change was detected. 1459 (GitHub #485). 1460 </para> 1461 </listitem> 1462 1463 <listitem> 1464 <para> 1465 Report version number <emphasis>after</emphasis> 1466 logger initialisation. (GitHub #487). 1467 </para> 1468 </listitem> 1469 1470 <listitem> 1471 <para> 1472 Improve cascaded standby failover handling. (GitHub #480). 1473 </para> 1474 </listitem> 1475 1476 <listitem> 1477 <para> 1478 Improve reconnection handling after brief network outages; if 1479 monitoring data being collected, this could lead to orphaned 1480 sessions on the primary. (GitHub #480). 1481 </para> 1482 </listitem> 1483 1484 <listitem> 1485 <para> 1486 Check <varname>promote_command</varname> and <varname>follow_command</varname> 1487 are defined when reloading configuration. These were checked on startup but 1488 not reload by &repmgrd;, which made it possible to 1489 make &repmgrd; with invalid values. It's unlikely 1490 anyone would want to do this, but we should make it impossible anyway. 1491 (GitHub #486). 1492 </para> 1493 </listitem> 1494 1495 </itemizedlist> 1496 </para> 1497 </sect2> 1498 1499 <sect2> 1500 <title>Other</title> 1501 <para> 1502 <itemizedlist> 1503 1504 <listitem> 1505 <para> 1506 Text of any failed queries will now be logged as <literal>ERROR</literal> to assist 1507 logfile analysis at log levels higher than <literal>DEBUG</literal>. 1508 (GitHub #498). 1509 </para> 1510 </listitem> 1511 </itemizedlist> 1512 </para> 1513 </sect2> 1514 1515 <sect2> 1516 <title>Bug fixes</title> 1517 <para> 1518 <itemizedlist> 1519 1520 <listitem> 1521 <para> 1522 <command><link linkend="repmgr-node-rejoin">repmgr node rejoin</link></command>: 1523 remove new upstream's replication slot if it still exists on the rejoined 1524 standby. (GitHub #499). 1525 </para> 1526 </listitem> 1527 1528 <listitem> 1529 <para> 1530 &repmgrd;: fix startup on witness node when local data is stale. (GitHub #488, #489). 1531 </para> 1532 </listitem> 1533 1534 <listitem> 1535 <para> 1536 Truncate version string reported by PostgreSQL if necessary; some 1537 distributions insert additional detail after the actual version. 1538 (GitHub #490). 1539 </para> 1540 </listitem> 1541 1542 1543 </itemizedlist> 1544 </para> 1545 </sect2> 1546 1547 1548 </sect1> 1549 1550 1551 1552 <sect1 id="release-4.1.0"> 1553 <title>Release 4.1.0</title> 1554 <para><emphasis>Tue July 31, 2018</emphasis></para> 1555 <para> 1556 &repmgr; 4.1.0 introduces some changes to &repmgrd; 1557 behaviour and some additional configuration parameters. 1558 </para> 1559 <para> 1560 This release can be installed as a simple package upgrade from repmgr 4.0 ~ 4.0.6. 1561 The following post-upgrade steps must be carried out: 1562 1563 <itemizedlist> 1564 <listitem> 1565 <para> 1566 Execute <command>ALTER EXTENSION repmgr UPDATE</command> 1567 on the primary server in the database where &repmgr; is installed. 1568 </para> 1569 </listitem> 1570 <listitem> 1571 <para> 1572 &repmgrd; must be restarted on all nodes where it is running. 1573 </para> 1574 </listitem> 1575 1576 </itemizedlist> 1577 1578 A restart of the PostgreSQL server is <emphasis>not</emphasis> required 1579 for this release (unless upgrading from repmgr 3.x). 1580 </para> 1581 <para> 1582 See <xref linkend="upgrading-repmgr-extension"/> for more details. 1583 </para> 1584 1585 <para> 1586 Configuration changes are backwards-compatible and no changes to 1587 <filename>repmgr.conf</filename> are required. However users should 1588 review the changes listed below. 1589 </para> 1590 1591 <note> 1592 <para> 1593 <emphasis>Repository changes</emphasis> 1594 </para> 1595 <para> 1596 Coinciding with this release, the 2ndQuadrant repository structure has changed. 1597 See section <xref linkend="installation-packages"/> for details, particularly 1598 if you are using a RPM-based system. 1599 </para> 1600 </note> 1601 1602 <sect2> 1603 <title>Configuration file changes</title> 1604 1605 <para> 1606 <itemizedlist> 1607 1608 <listitem> 1609 <para> 1610 Default for <xref linkend="repmgr-conf-log-level"/> is now <option>INFO</option>. 1611 This produces additional informative log output, without creating excessive additional 1612 log file volume, and matches the setting assumed for examples in the documentation. 1613 (GitHub #470). 1614 </para> 1615 </listitem> 1616 1617 <listitem> 1618 <para> 1619 <varname>recovery_min_apply_delay</varname> now accepts a minimum value 1620 of <literal>zero</literal> (GitHub #448). 1621 </para> 1622 </listitem> 1623 1624 </itemizedlist> 1625 </para> 1626 1627 </sect2> 1628 1629 1630 <sect2> 1631 <title>repmgr enhancements</title> 1632 <para> 1633 <itemizedlist> 1634 1635 <listitem> 1636 <para> 1637 <application>repmgr</application>: always exit with an error if an unrecognised 1638 command line option is provided. This matches the behaviour of other PostgreSQL 1639 utilities such as <application>psql</application>. (GitHub #464). 1640 </para> 1641 </listitem> 1642 1643 <listitem> 1644 <para> 1645 <application>repmgr</application>: add <option>-q/--quiet</option> option to suppress non-error 1646 output. (GitHub #468). 1647 </para> 1648 </listitem> 1649 1650 <listitem> 1651 <para> 1652 <command><link linkend="repmgr-cluster-show">repmgr cluster show</link></command>, 1653 <command><link linkend="repmgr-node-check">repmgr node check</link></command> and 1654 <command><link linkend="repmgr-node-status">repmgr node status</link></command> 1655 return non-zero exit code if node status issues detected. (GitHub #456). 1656 </para> 1657 </listitem> 1658 1659 <listitem> 1660 <para> 1661 Add <option>--csv</option> output option for 1662 <command><link linkend="repmgr-cluster-event">repmgr cluster event</link></command>. 1663 (GitHub #471). 1664 </para> 1665 </listitem> 1666 1667 <listitem> 1668 <para> 1669 <command><link linkend="repmgr-witness-unregister">repmgr witness unregister</link></command> 1670 can be run on any node, by providing the ID of the witness node with <option>--node-id</option>. 1671 (GitHub #472). 1672 </para> 1673 </listitem> 1674 1675 <listitem> 1676 <para> 1677 <command><link linkend="repmgr-standby-switchover">repmgr standby switchover</link></command> 1678 will refuse to run if an exclusive backup is taking place on the current primary. 1679 (GitHub #476). 1680 </para> 1681 </listitem> 1682 1683 </itemizedlist> 1684 </para> 1685 </sect2> 1686 1687 <sect2> 1688 <title>repmgrd enhancements</title> 1689 <para> 1690 <itemizedlist> 1691 1692 <listitem> 1693 <para> 1694 &repmgrd;: create a PID file by default 1695 (GitHub #457). For details, see <xref linkend="repmgrd-pid-file"/>. 1696 </para> 1697 </listitem> 1698 1699 <listitem> 1700 <para> 1701 &repmgrd;: daemonize process by default. 1702 In case, for whatever reason, the user does not wish to daemonize the 1703 process, provide <option>--daemonize=false</option>. 1704 (GitHub #458). 1705 </para> 1706 </listitem> 1707 1708 1709 </itemizedlist> 1710 </para> 1711 </sect2> 1712 1713 1714 <sect2> 1715 <title>Bug fixes</title> 1716 <para> 1717 <itemizedlist> 1718 1719 <listitem> 1720 <para> 1721 <command><link linkend="repmgr-standby-register">repmgr standby register --wait-sync</link></command>: 1722 fix behaviour when no timeout provided. 1723 </para> 1724 </listitem> 1725 1726 <listitem> 1727 <para> 1728 <command><link linkend="repmgr-cluster-cleanup">repmgr cluster cleanup</link></command>: 1729 add missing help options. (GitHub #461/#462). 1730 </para> 1731 </listitem> 1732 1733 <listitem> 1734 <para> 1735 Ensure witness node follows new primary after switchover. (GitHub #453). 1736 </para> 1737 </listitem> 1738 1739 <listitem> 1740 <para> 1741 <command><link linkend="repmgr-node-check">repmgr node check</link></command> and 1742 <command><link linkend="repmgr-node-status">repmgr node status</link></command>: 1743 fix witness node handling. (GitHub #451). 1744 </para> 1745 </listitem> 1746 1747 <listitem> 1748 <para> 1749 When using <command><link linkend="repmgr-standby-clone">repmgr standby clone</link></command> 1750 with <option>--recovery-conf-only</option> and replication slots, ensure 1751 <varname>primary_slot_name</varname> is set correctly. (GitHub #474). 1752 </para> 1753 </listitem> 1754 1755 </itemizedlist> 1756 </para> 1757 </sect2> 1758 1759 </sect1> 1760 1761 <sect1 id="release-4.0.6"> 1762 <title>Release 4.0.6</title> 1763 <para><emphasis>Thu June 14, 2018</emphasis></para> 1764 <para> 1765 &repmgr; 4.0.6 contains a number of bug fixes and usability enhancements. 1766 </para> 1767 <para> 1768 We recommend upgrading to this version as soon as possible. 1769 This release can be installed as a simple package upgrade from repmgr 4.0 ~ 4.0.5; 1770 &repmgrd; (if running) should be restarted. See <xref linkend="upgrading-repmgr"/> 1771 for more details. 1772 </para> 1773 1774 <sect2> 1775 <title>Usability enhancements</title> 1776 1777 <para> 1778 <itemizedlist> 1779 <listitem> 1780 <para> 1781 <command><link linkend="repmgr-cluster-crosscheck">repmgr cluster crosscheck</link></command> and 1782 <command><link linkend="repmgr-cluster-matrix">repmgr cluster matrix</link></command>: 1783 return non-zero exit code if node connection issues detected (GitHub #447) 1784 </para> 1785 </listitem> 1786 1787 <listitem> 1788 <para> 1789 <command><link linkend="repmgr-standby-clone">repmgr standby clone</link></command>: 1790 Improve handling of external configuration file copying, including consideration in 1791 <option>--dry-run</option> check 1792 (GitHub #443) 1793 </para> 1794 </listitem> 1795 1796 <listitem> 1797 <para> 1798 When using <option>--dry-run</option>, force log level to <literal>INFO</literal> 1799 to ensure output will always be displayed 1800 (GitHub #441) 1801 </para> 1802 </listitem> 1803 1804 <listitem> 1805 <para> 1806 <command><link linkend="repmgr-standby-clone">repmgr standby clone</link></command>: 1807 Improve documentation of <option>--recovery-conf-only</option> mode 1808 (GitHub #438) 1809 </para> 1810 </listitem> 1811 1812 <listitem> 1813 <para> 1814 <command><link linkend="repmgr-standby-clone">repmgr standby clone</link></command>: 1815 Don't require presence of <varname>user</varname> parameter in conninfo string 1816 (GitHub #437) 1817 </para> 1818 </listitem> 1819 1820 1821 </itemizedlist> 1822 </para> 1823 </sect2> 1824 1825 <sect2> 1826 <title>Bug fixes</title> 1827 <para> 1828 1829 <itemizedlist> 1830 1831 <listitem> 1832 <para> 1833 <command><link linkend="repmgr-witness-register">repmgr witness register</link></command>: 1834 prevent registration of a witness server with the same name as an existing node 1835 </para> 1836 </listitem> 1837 1838 1839 <listitem> 1840 <para> 1841 <command><link linkend="repmgr-standby-follow">repmgr standby follow</link></command>: 1842 check node has actually connected to new primary before reporting success 1843 (GitHub #444) 1844 </para> 1845 </listitem> 1846 1847 <listitem> 1848 <para> 1849 <command><link linkend="repmgr-node-rejoin">repmgr node rejoin</link></command>: 1850 Fix bug when parsing <option>--config-files</option> parameter 1851 (GitHub #442) 1852 </para> 1853 </listitem> 1854 1855 <listitem> 1856 <para> 1857 &repmgrd;: ensure local node is counted as quorum member 1858 (GitHub #439) 1859 </para> 1860 </listitem> 1861 1862 </itemizedlist> 1863 </para> 1864 </sect2> 1865 1866 </sect1> 1867 1868 <sect1 id="release-4.0.5"> 1869 <title>Release 4.0.5</title> 1870 <para><emphasis>Wed May 2, 2018</emphasis></para> 1871 <para> 1872 &repmgr; 4.0.5 contains a number of usability enhancements related to 1873 <application>pg_rewind</application> usage, <filename>recovery.conf</filename> 1874 generation and (in &repmgrd;) handling of various 1875 corner-case situations, as well as a number of bug fixes. 1876 </para> 1877 1878 <sect2> 1879 <title>Usability enhancements</title> 1880 1881 <para> 1882 <itemizedlist> 1883 <listitem> 1884 <para> 1885 Various documentation improvements, with particular emphasis on 1886 the importance of setting appropriate <link linkend="configuration-file-service-commands">service commands</link> 1887 instead of relying on <application>pg_ctl</application>. 1888 </para> 1889 </listitem> 1890 1891 <listitem> 1892 <para> 1893 Poll demoted primary after restart as a standby during a switchover operation (GitHub #408). 1894 </para> 1895 </listitem> 1896 1897 <listitem> 1898 <para> 1899 Add configuration parameter <option>config_directory</option> (GitHub #424). 1900 </para> 1901 </listitem> 1902 1903 <listitem> 1904 <para> 1905 Add sanity check if <option>--upstream-node-id</option> not supplied when executing 1906 <xref linkend="repmgr-standby-register"/> (GitHub #395). 1907 </para> 1908 </listitem> 1909 1910 <listitem> 1911 <para> 1912 Enable <link linkend="repmgr-node-rejoin-pg-rewind">pg_rewind</link> to be used with 1913 PostgreSQL 9.3/9.4 (GitHub #413). 1914 </para> 1915 </listitem> 1916 1917 <listitem> 1918 <para> 1919 When generating replication connection strings, set <literal>dbname=replication</literal> 1920 if appropriate (GitHub #421). 1921 </para> 1922 </listitem> 1923 1924 <listitem> 1925 <para> 1926 Enable provision of <option>archive_cleanup_command</option> in <filename>recovery.conf</filename> 1927 (GitHub #416). 1928 </para> 1929 </listitem> 1930 1931 <listitem> 1932 <para> 1933 Actively check for node to <link linkend="repmgr-node-rejoin">rejoin</link> cluster (GitHub #415). 1934 </para> 1935 </listitem> 1936 1937 <listitem> 1938 <para> 1939 &repmgrd;: set <literal>connect_timeout=2</literal> (if not explicitly set) 1940 when pinging a server. 1941 </para> 1942 </listitem> 1943 1944 </itemizedlist> 1945 </para> 1946 1947 </sect2> 1948 1949 <sect2> 1950 <title>Bug fixes</title> 1951 <para> 1952 1953 <itemizedlist> 1954 1955 <listitem> 1956 <para> 1957 Fix display of conninfo parsing error messages. 1958 </para> 1959 </listitem> 1960 1961 1962 <listitem> 1963 <para> 1964 Fix minimum accepted value for <varname>degraded_monitoring_timeout</varname> (GitHub #411). 1965 </para> 1966 </listitem> 1967 1968 <listitem> 1969 <para> 1970 Fix superuser password handling (GitHub #400) 1971 </para> 1972 </listitem> 1973 1974 <listitem> 1975 <para> 1976 Fix parsing of <varname>archive_ready_critical</varname> configuration file parameter (GitHub #426). 1977 </para> 1978 </listitem> 1979 1980 <listitem> 1981 <para> 1982 Fix <command><link linkend="repmgr-cluster-crosscheck">repmgr cluster crosscheck</link></command> 1983 output (GitHub #389) 1984 </para> 1985 </listitem> 1986 1987 <listitem> 1988 <para> 1989 Fix memory leaks in witness code (GitHub #402). 1990 </para> 1991 </listitem> 1992 1993 <listitem> 1994 <para> 1995 &repmgrd;: handle <command>pg_ctl promote</command> timeout (GitHub #425). 1996 </para> 1997 </listitem> 1998 1999 <listitem> 2000 <para> 2001 &repmgrd;: handle failover situation with only two nodes in the primary 2002 location, and at least one node in another location (GitHub #407). 2003 </para> 2004 </listitem> 2005 2006 <listitem> 2007 <para> 2008 &repmgrd;: prevent standby connection handle from going stale. 2009 </para> 2010 </listitem> 2011 2012 2013 2014 </itemizedlist> 2015 </para> 2016 </sect2> 2017 2018 </sect1> 2019 2020 2021 <sect1 id="release-4.0.4"> 2022 <title>Release 4.0.4</title> 2023 <para><emphasis>Fri Mar 9, 2018</emphasis></para> 2024 2025 <para> 2026 &repmgr; 4.0.4 contains some bug fixes and and a number of 2027 usability enhancements related to logging/diagnostics, 2028 event notifications and pre-action checks. 2029 </para> 2030 <para> 2031 This release can be installed as a simple package upgrade from repmgr 4.0 ~ 4.0.3; 2032 &repmgrd; (if running) should be restarted. See <xref linkend="upgrading-repmgr"/> 2033 for more details. 2034 </para> 2035 2036 <note> 2037 <para> 2038 It is not possible to perform a switchover where the demotion candidate is 2039 running &repmgr; 4.0.2 or lower; all nodes should be upgraded to the latest version (4.0.4). 2040 This is due to additional checks introduced in 4.0.3 which require the presence of 2041 4.0.3 or later versions on all nodes. 2042 </para> 2043 </note> 2044 2045 <sect2> 2046 <title>Usability enhancements</title> 2047 2048 <para> 2049 <itemizedlist> 2050 2051 <listitem> 2052 <para> 2053 add <command><link linkend="repmgr-standby-clone">repmgr standby clone --recovery-conf-only</link></command> 2054 option to enable integration of a standby cloned from another source into a &repmgr; cluster (GitHub #382) 2055 </para> 2056 </listitem> 2057 2058 <listitem> 2059 <para> 2060 remove restriction on using replication slots when cloning from a Barman server (GitHub #379) 2061 </para> 2062 </listitem> 2063 2064 <listitem> 2065 <para> 2066 make <command><link linkend="repmgr-standby-promote">repmgr standby promote</link></command> 2067 timeout values configurable (GitHub #387) 2068 </para> 2069 </listitem> 2070 2071 <listitem> 2072 <para> 2073 add missing options to main <literal>--help</literal> output (GitHub #391, #392) 2074 </para> 2075 </listitem> 2076 2077 </itemizedlist> 2078 </para> 2079 2080 </sect2> 2081 2082 <sect2> 2083 <title>Bug fixes</title> 2084 <para> 2085 2086 <itemizedlist> 2087 2088 <listitem> 2089 <para> 2090 ensure <command><link linkend="repmgr-node-rejoin">repmgr node rejoin</link></command> 2091 honours the <option>--dry-run</option> option (GitHub #383) 2092 </para> 2093 </listitem> 2094 2095 <listitem> 2096 <para> 2097 improve replication slot warnings generated by 2098 <command><link linkend="repmgr-node-status">repmgr node status</link></command> 2099 (GitHub #385) 2100 </para> 2101 </listitem> 2102 2103 <listitem> 2104 <para> 2105 fix --superuser handling when cloning a standby (GitHub #380) 2106 </para> 2107 </listitem> 2108 2109 <listitem> 2110 <para> 2111 &repmgrd;: improve detection of status change from primary to 2112 standby 2113 </para> 2114 </listitem> 2115 2116 <listitem> 2117 <para> 2118 &repmgrd;: improve reconnection to the local node after a 2119 failover (previously a connection error due to the node starting up was being 2120 interpreted as the node being unavailable) 2121 </para> 2122 </listitem> 2123 2124 <listitem> 2125 <para> 2126 &repmgrd;: when running on a witness server, correctly connect 2127 to new primary after a failover 2128 </para> 2129 </listitem> 2130 2131 <listitem> 2132 <para> 2133 &repmgrd;: add <link linkend="event-notifications">event notification</link> 2134 <literal>repmgrd_shutdown</literal> (GitHub #393) 2135 </para> 2136 </listitem> 2137 2138 </itemizedlist> 2139 2140 </para> 2141 </sect2> 2142 2143 </sect1> 2144 2145 <sect1 id="release-4.0.3"> 2146 <title>Release 4.0.3</title> 2147 <para><emphasis>Thu Feb 15, 2018</emphasis></para> 2148 2149 <para> 2150 &repmgr; 4.0.3 contains some bug fixes and and a number of 2151 usability enhancements related to logging/diagnostics, 2152 event notifications and pre-action checks. 2153 </para> 2154 2155 <para> 2156 This release can be installed as a simple package upgrade from repmgr 4.0 ~ 4.0.2; 2157 repmgrd (if running) should be restarted. 2158 </para> 2159 <note> 2160 <para> 2161 It is not possible to perform a switchover where the demotion candidate is 2162 running &repmgr; 4.0.2 or lower; all nodes should be upgraded to 4.0.3. This is due 2163 to additional checks introduced in 4.0.3 which require the presence of 2164 4.0.3 or later versions on all nodes. 2165 </para> 2166 </note> 2167 <sect2> 2168 <title>Usability enhancements</title> 2169 2170 <para> 2171 <itemizedlist> 2172 2173 <listitem> 2174 <para> 2175 improve <command><link linkend="repmgr-standby-switchover">repmgr standby switchover</link></command> 2176 behaviour when <command>pg_ctl</command> is used to control the server and logging output is 2177 not explicitly redirected 2178 </para> 2179 </listitem> 2180 2181 <listitem> 2182 <para> 2183 improve <command><link linkend="repmgr-standby-switchover">repmgr standby switchover</link></command> 2184 log messages and provide new exit code <literal>ERR_SWITCHOVER_INCOMPLETE</literal> when old primary could 2185 not be shut down cleanly 2186 </para> 2187 </listitem> 2188 2189 <listitem> 2190 <para> 2191 add check to verify the demotion candidate can make a replication connection to the 2192 promotion candidate before executing a switchover (GitHub #370) 2193 </para> 2194 </listitem> 2195 2196 <listitem> 2197 <para> 2198 add check for sufficient walsenders and replication slots on the promotion candidate before executing 2199 <command><link linkend="repmgr-standby-switchover">repmgr standby switchover</link></command> 2200 (GitHub #371) 2201 </para> 2202 </listitem> 2203 2204 <listitem> 2205 <para> 2206 add --dry-run mode to <command><link linkend="repmgr-standby-switchover">repmgr standby follow</link></command> 2207 (GitHub #368) 2208 </para> 2209 </listitem> 2210 2211 <listitem> 2212 <para> 2213 provide information about the primary node for 2214 <command><link linkend="repmgr-standby-register">repmgr standby register</link></command> and 2215 <command><link linkend="repmgr-standby-follow">repmgr standby follow</link></command> event notifications (GitHub #375) 2216 </para> 2217 </listitem> 2218 2219 <listitem> 2220 <para> 2221 add <literal>standby_register_sync</literal> <link linkend="event-notifications">event notification</link>, which is fired when 2222 <command><link linkend="repmgr-standby-register">repmgr standby register</link></command> 2223 is run with the <option>--wait-sync</option> option and the new or updated standby node 2224 record has synchronised to the standby (GitHub #374) 2225 </para> 2226 </listitem> 2227 2228 <listitem> 2229 <para> 2230 when running <command><link linkend="repmgr-cluster-show">repmgr cluster show</link></command>, 2231 if any node is unreachable, output the error message encountered in the list of warnings 2232 (GitHub #369) 2233 </para> 2234 </listitem> 2235 2236 </itemizedlist> 2237 </para> 2238 </sect2> 2239 2240 <sect2> 2241 <title>Bug fixes</title> 2242 2243 <para> 2244 <itemizedlist> 2245 <listitem> 2246 <para> 2247 ensure an inactive data directory can be overwritten when 2248 cloning a standby (GitHub #366) 2249 </para> 2250 </listitem> 2251 2252 <listitem> 2253 <para> 2254 <command><link linkend="repmgr-node-status">repmgr node status</link></command> 2255 upstream node display fixed (GitHub #363) 2256 </para> 2257 </listitem> 2258 2259 <listitem> 2260 <para> 2261 <command><link linkend="repmgr-primary-unregister">repmgr primary unregister</link></command>: 2262 clarify usage and fix <literal>--help</literal> output (GitHub #373) 2263 </para> 2264 </listitem> 2265 2266 <listitem> 2267 <para> 2268 parsing of <varname>pg_basebackup_options</varname> fixed (GitHub #376) 2269 </para> 2270 </listitem> 2271 2272 <listitem> 2273 <para> 2274 ensure the <filename>pg_subtrans</filename> directory is created when cloning a 2275 standby in Barman mode 2276 </para> 2277 </listitem> 2278 2279 <listitem> 2280 <para> 2281 <command><link linkend="repmgr-witness-register">repmgr witness register</link></command>: 2282 fix primary node check (GitHub #377). 2283 </para> 2284 </listitem> 2285 </itemizedlist> 2286 2287 </para> 2288 </sect2> 2289 2290 </sect1> 2291 2292 2293 <sect1 id="release-4.0.2"> 2294 <title>Release 4.0.2</title> 2295 <para><emphasis>Thu Jan 18, 2018</emphasis></para> 2296 2297 <para> 2298 &repmgr; 4.0.2 contains some bug fixes and small usability enhancements. 2299 </para> 2300 <para> 2301 This release can be installed as a simple package upgrade from &repmgr; 4.0.1 or 4.0; 2302 &repmgrd; (if running) should be restarted. 2303 </para> 2304 2305 <sect2> 2306 <title>Usability enhancements</title> 2307 2308 <para> 2309 <itemizedlist> 2310 <listitem> 2311 <para> 2312 Recognize the <option>-t</option>/<option>--terse</option> option for 2313 <command><link linkend="repmgr-cluster-event">repmgr cluster event</link></command> to hide 2314 the <literal>Details</literal> column (GitHub #360) 2315 </para> 2316 </listitem> 2317 2318 <listitem> 2319 <para> 2320 Add "--wait-start" option for 2321 <command><link linkend="repmgr-standby-register">repmgr standby register</link></command> 2322 (GitHub #356) 2323 </para> 2324 </listitem> 2325 2326 <listitem> 2327 <para> 2328 Add <literal>%p</literal> <link linkend="event-notifications">event notification parameter</link> 2329 for <command><link linkend="repmgr-standby-switchover">repmgr standby switchover</link></command> 2330 </para> 2331 </listitem> 2332 </itemizedlist> 2333 </para> 2334 2335 </sect2> 2336 2337 <sect2> 2338 <title>Bug fixes</title> 2339 2340 <para> 2341 <itemizedlist> 2342 <listitem> 2343 <para> 2344 Add missing -W option to <literal>getopt_long()</literal> invocation (GitHub #350) 2345 </para> 2346 </listitem> 2347 2348 <listitem> 2349 <para> 2350 Automatically create slot name if missing (GitHub #343) 2351 </para> 2352 </listitem> 2353 2354 <listitem> 2355 <para> 2356 Fixes to parsing output of remote repmgr invocations (GitHub #349) 2357 </para> 2358 </listitem> 2359 2360 2361 <listitem> 2362 <para> 2363 When registering BDR nodes, automatically create missing connection replication set (GitHub #347) 2364 </para> 2365 </listitem> 2366 2367 2368 <listitem> 2369 <para> 2370 Handle missing node record in <command><link linkend="repmgr-node-rejoin">repmgr node rejoin</link></command> 2371 (GitHub #358) 2372 </para> 2373 </listitem> 2374 2375 2376 </itemizedlist> 2377 </para> 2378 2379 </sect2> 2380 2381 <sect2> 2382 <title>Documentation</title> 2383 2384 <para> 2385 <itemizedlist> 2386 <listitem> 2387 <para> 2388 The documentation can now be built as a single HTML file (GitHub pull request #353) 2389 </para> 2390 </listitem> 2391 </itemizedlist> 2392 </para> 2393 </sect2> 2394 2395 </sect1> 2396 2397 <sect1 id="release-4.0.1"> 2398 <title>Release 4.0.1</title> 2399 2400 <para><emphasis>Wed Dec 13, 2017</emphasis></para> 2401 2402 <para> 2403 &repmgr; 4.0.1 is a bugfix release. 2404 </para> 2405 <sect2> 2406 <title>Bug fixes</title> 2407 <para> 2408 <itemizedlist> 2409 <listitem> 2410 <para> 2411 ensure correct return codes are returned for 2412 <command><link linkend="repmgr-node-check">repmgr node check --action=</link></command> operations 2413 (GitHub #340) 2414 </para> 2415 </listitem> 2416 2417 <listitem> 2418 <para> 2419 Fix <xref linkend="repmgr-cluster-show"/> when <literal>repmgr</literal> schema not set in search path 2420 (GitHub #341) 2421 </para> 2422 </listitem> 2423 2424 <listitem> 2425 <para> 2426 When using <literal>--force-rewind</literal> with <xref linkend="repmgr-node-rejoin"/> 2427 delete any replication slots copied by <application>pg_rewind</application> 2428 (GitHub #334) 2429 </para> 2430 </listitem> 2431 2432 <listitem> 2433 <para> 2434 Only perform sanity check on accessibility of configuration files outside 2435 the data directory when <literal>--copy-external-config-files</literal> 2436 provided (GitHub #342) 2437 </para> 2438 </listitem> 2439 2440 <listitem> 2441 <para> 2442 Initialise "voting_term" table in application, not extension SQL 2443 (GitHub #344) 2444 </para> 2445 </listitem> 2446 2447 </itemizedlist> 2448 </para> 2449 </sect2> 2450 </sect1> 2451 2452 2453 2454 <sect1 id="release-4.0.0"> 2455 <title>Release 4.0.0</title> 2456 2457 <para><emphasis>Tue Nov 21, 2017</emphasis></para> 2458 2459 <para> 2460 repmgr 4.0 is an entirely new version of &repmgr;, implementing &repmgr; 2461 as a native PostgreSQL extension, adding new and improving existing features, 2462 and making &repmgr; more user-friendly and intuitive to use. The new code base 2463 will make it easier to add additional functionality for future releases. 2464 </para> 2465 <note> 2466 <simpara> 2467 With the new version, the opportunity has been taken to 2468 make some changes in the way &repmgr; is set up and 2469 configured. In particular changes have been made to some 2470 configuration file settings consistency for and clarity. 2471 Changes are covered in detail below 2472 </simpara> 2473 <simpara> 2474 To standardise terminology, from this release <literal>primary</literal> is used to 2475 denote the read/write node in a streaming replication cluster. <literal>master</literal> 2476 is still accepted as an alias for &repmgr; commands 2477 (e.g. <link linkend="repmgr-primary-register"><command>repmgr master register</command></link>). 2478 </simpara> 2479 </note> 2480 2481 <para> 2482 For detailed instructions on upgrading from repmgr 3.x, see <xref linkend="upgrading-from-repmgr-3"/>. 2483 </para> 2484 2485 <sect2> 2486 <title>Features and improvements</title> 2487 <para> 2488 2489 <itemizedlist> 2490 <listitem> 2491 <para> 2492 <emphasis>improved switchover</emphasis>: 2493 the <command>switchover</command> process has been improved and streamlined, 2494 speeding up the switchover process and can also instruct other standbys 2495 to follow the new primary once the switchover has completed. See 2496 <xref linkend="performing-switchover"/> for more details. 2497 </para> 2498 </listitem> 2499 2500 <listitem> 2501 <para> 2502 <emphasis>"--dry-run" option</emphasis>: many &repmgr; commands now provide 2503 a <literal>--dry-run</literal> option which will execute the command as far 2504 as possible without making any changes, which will enable possible issues 2505 to be identified before the intended operation is actually carried out. 2506 </para> 2507 </listitem> 2508 2509 <listitem> 2510 <para> 2511 <emphasis>easier upgrades</emphasis>: &repmgr; is now implemented as a native 2512 PostgreSQL extension, which means future upgrades can be carried out by 2513 installing the upgraded package and issuing 2514 <ulink url="https://www.postgresql.org/docs/current/sql-alterextension.html">ALTER EXTENSION repmgr UPDATE</ulink>. 2515 </para> 2516 </listitem> 2517 2518 2519 <listitem> 2520 <para> 2521 <emphasis>improved logging output</emphasis>: 2522 &repmgr; (and &repmgrd;) now provide more explicit 2523 logging output giving a better picture of what is going on. Where appropriate, 2524 <literal>DETAIL</literal> and <literal>HINT</literal> log lines provide additional 2525 detail and suggestions for resolving problems. Additionally, &repmgrd; 2526 now emits informational log lines at regular, configurable intervals 2527 to confirm that it's running correctly and which node(s) it's monitoring. 2528 </para> 2529 </listitem> 2530 2531 <listitem> 2532 <para> 2533 <emphasis>automatic configuration file location in packages</emphasis>: 2534 Many operating system packages place the &repmgr; configuration files 2535 in a version-specific subdirectory, e.g. <filename>/etc/repmgr/9.6/repmgr.conf</filename>; 2536 &repmgr; now makes it easy for package maintainers to provide a patch 2537 with the actual file location, meaning <filename>repmgr.conf</filename> 2538 does not need to be provided explicitly. This is currently the case 2539 for 2ndQuadrant-provided <literal>.deb</literal> and <literal>.rpm</literal> packages. 2540 </para> 2541 </listitem> 2542 2543 2544 <listitem> 2545 <para> 2546 <emphasis>monitoring and status checks</emphasis>: 2547 New commands <xref linkend="repmgr-node-check"/> and 2548 <xref linkend="repmgr-node-status"/> providing information 2549 about a node's status and replication-related monitoring 2550 output. 2551 </para> 2552 </listitem> 2553 2554 2555 <listitem> 2556 <para> 2557 <emphasis>node rejoin</emphasis>: 2558 New commands <xref linkend="repmgr-node-rejoin"/> enables a failed 2559 primary to be rejoined to a replication cluster, optionally using 2560 <application>pg_rewind</application> to synchronise its data, 2561 (note that <application>pg_rewind</application> may not be useable 2562 in some circumstances). 2563 </para> 2564 </listitem> 2565 2566 2567 <listitem> 2568 <para> 2569 <emphasis>automatic failover</emphasis>: 2570 improved detection of node status; promotion decision based on a consensual 2571 model, with the promoted primary explicitly informing other standbys to 2572 follow it. The &repmgrd; daemon will continue 2573 functioning even if the monitored PostgreSQL instance is down, and resume 2574 monitoring if it reappears. Additionally, if the instance's role has changed 2575 (typically from a primary to a standby, e.g. following reintegration of a 2576 failed primary using <xref linkend="repmgr-node-rejoin"/>) &repmgrd; 2577 will automatically resume monitoring it as a standby. 2578 </para> 2579 </listitem> 2580 2581 2582 2583 <listitem> 2584 <para> 2585 <emphasis>new documentation</emphasis>: 2586 the existing documentation spread over multiple text files 2587 has been consolidated into DocBook format (as used by the 2588 main PostgreSQL project) and is now available online in 2589 HTML format. 2590 </para> 2591 <para> 2592 The DocBook files can easily be used to create versions 2593 of the documentation in other formats such as PDF. 2594 </para> 2595 </listitem> 2596 2597 </itemizedlist> 2598 2599 </para> 2600 </sect2> 2601 <sect2> 2602 <title>New command line options</title> 2603 <para> 2604 <itemizedlist> 2605 2606 <listitem><para> 2607 <literal>--dry-run</literal>: &repmgr; will attempt to perform 2608 the action as far as possible without making any changes to the 2609 database 2610 </para></listitem> 2611 2612 <listitem> 2613 <para> 2614 <literal>--upstream-node-id</literal>: use to specify the upstream node 2615 the standby will connect later stream from, when <link linkend="repmgr-standby-clone">cloning</link> 2616 and <link linkend="repmgr-standby-register">registering</link> a standby. 2617 </para> 2618 <para> 2619 This replaces the configuration file parameter <varname>upstream_node</varname>. 2620 as the upstream node is set when the standby is initially cloned, but can change 2621 over the lifetime of an installation (due to failovers, switchovers etc.) so it's 2622 pointless/confusing keeping the original value around in <filename>repmgr.conf</filename>. 2623 </para></listitem> 2624 2625 </itemizedlist> 2626 </para> 2627 </sect2> 2628 2629 <sect2> 2630 <title>Changed command line options</title> 2631 <para> 2632 <application>repmgr</application> 2633 <itemizedlist> 2634 2635 <listitem><para> 2636 <literal>--replication-user</literal> has been deprecated; it has been replaced 2637 by the configuration file option <varname>replication_user</varname>. 2638 The value (which defaults to the user provided in the <varname>conninfo</varname> 2639 string) will be stored in the &repmgr; metadata for use by 2640 <xref linkend="repmgr-standby-clone"/> and <xref linkend="repmgr-standby-follow"/>. 2641 </para></listitem> 2642 2643 <listitem><para> 2644 <literal>--recovery-min-apply-delay</literal> is now a configuration file parameter 2645 <varname>recovery_min_apply_delay</varname>, to ensure the setting does not get lost 2646 when a standby follows a new upstream. 2647 </para></listitem> 2648 2649 <listitem><para> 2650 <literal>--no-conninfo-password</literal> is deprecated; a password included in 2651 the environment variable <varname>PGPASSWORD</varname> will no longer be added 2652 to <varname>primary_conninfo</varname> by default; to force the inclusion 2653 of a password (not recommended), use the new configuration file parameter 2654 <varname>use_primary_conninfo_password</varname>. For details, ee section 2655 <xref linkend="cloning-advanced-managing-passwords"/>. 2656 </para></listitem> 2657 2658 </itemizedlist> 2659 </para> 2660 2661 <para> 2662 &repmgrd; 2663 <itemizedlist> 2664 2665 <listitem><para> 2666 <literal>--monitoring-history</literal> is deprecated and is replaced by the 2667 configuration file option <varname>monitoring_history</varname>. 2668 This enables the setting to be changed without having to modify system service 2669 files. 2670 </para></listitem> 2671 2672 </itemizedlist> 2673 </para> 2674 2675 </sect2> 2676 2677 <sect2> 2678 <title>Configuration file changes</title> 2679 2680 <para><emphasis>Required settings</emphasis></para> 2681 <para>The following 4 parameters are mandatory in <filename>repmgr.conf</filename>: 2682 <itemizedlist spacing="compact" mark="bullet"> 2683 2684 <listitem> 2685 <simpara>node_id</simpara> 2686 </listitem> 2687 2688 <listitem> 2689 <simpara>node_name</simpara> 2690 </listitem> 2691 2692 <listitem> 2693 <simpara>conninfo</simpara> 2694 </listitem> 2695 2696 <listitem> 2697 <simpara>data_directory</simpara> 2698 </listitem> 2699 </itemizedlist> 2700 </para> 2701 2702 <para><emphasis>Renamed settings</emphasis></para> 2703 <para> 2704 Some settings have been renamed for clarity and consistency: 2705 <itemizedlist spacing="compact" mark="bullet"> 2706 2707 <listitem> 2708 <simpara><varname>node</varname> is now <varname>node_id</varname></simpara> 2709 </listitem> 2710 2711 <listitem> 2712 <simpara><varname>name</varname> is now <varname>node_name</varname></simpara> 2713 </listitem> 2714 2715 <listitem> 2716 <simpara><varname>barman_server</varname> is now <varname>barman_host</varname></simpara> 2717 </listitem> 2718 2719 <listitem> 2720 <simpara><varname>master_reponse_timeout</varname> is now 2721 <varname>async_query_timeout</varname> (to better indicate its purpose) 2722 </simpara> 2723 </listitem> 2724 2725 </itemizedlist> 2726 </para> 2727 2728 <para> 2729 The following configuration file parameters have been renamed for consistency 2730 with other parameters (and conform to the pattern used by PostgreSQL itself, 2731 which uses the prefix <varname>log_</varname> for logging parameters): 2732 2733 <itemizedlist spacing="compact" mark="bullet"> 2734 2735 <listitem> 2736 <simpara><varname>loglevel</varname> is now <varname>log_level</varname></simpara> 2737 </listitem> 2738 2739 <listitem> 2740 <simpara><varname>logfile</varname> is now <varname>log_file</varname></simpara> 2741 </listitem> 2742 2743 <listitem> 2744 <simpara><varname>logfacility</varname> is now <varname>log_facility</varname></simpara> 2745 </listitem> 2746 2747 </itemizedlist> 2748 </para> 2749 2750 <para><emphasis>Removed settings</emphasis></para> 2751 <para> 2752 <itemizedlist spacing="compact" mark="bullet"> 2753 2754 <listitem> 2755 <simpara><varname>cluster</varname> has been removed</simpara> 2756 </listitem> 2757 <listitem> 2758 <simpara><varname>upstream_node</varname> - see note about 2759 <literal>--upstream-node-id</literal> above</simpara> 2760 </listitem> 2761 2762 <listitem> 2763 <simpara><varname>retry_promote_interval_secs</varname>this is now redundant due 2764 to changes in the failover/promotion mechanism; the new equivalent is 2765 <varname>primary_notification_timeout</varname> </simpara> 2766 </listitem> 2767 </itemizedlist> 2768 </para> 2769 2770 <para><emphasis>Logging changes</emphasis></para> 2771 <para> 2772 <itemizedlist spacing="compact" mark="bullet"> 2773 2774 <listitem> 2775 <simpara> 2776 default value for <varname>log_level</varname> is <literal>INFO</literal> 2777 rather than <literal>NOTICE</literal>. 2778 </simpara> 2779 </listitem> 2780 2781 <listitem> 2782 <simpara> 2783 new parameter <varname>log_status_interval</varname>, which causes 2784 &repmgrd; to emit a status log 2785 line at the specified interval 2786 </simpara> 2787 </listitem> 2788 2789 </itemizedlist> 2790 2791 </para> 2792 2793 </sect2> 2794 <sect2> 2795 <title>repmgrd</title> 2796 <para> 2797 The shared library has been renamed from <literal>repmgr_funcs</literal> to 2798 <literal>repmgr</literal>, meaning <varname>shared_preload_libraries</varname> 2799 in <filename>postgresql.conf</filename> needs to be updated to the new name: 2800 <programlisting> 2801 shared_preload_libraries = 'repmgr'</programlisting> 2802 </para> 2803 </sect2> 2804 2805 </sect1> 2806 2807</appendix> 2808