Skip to content

Version 2.2.1

Compare
Choose a tag to compare
@gsmolk gsmolk released this 12 Oct 11:57
· 1264 commits to master since this release

New features:

  • WAL Archive catalog. Now it is possible to view the state of every WAL timeline in archive. At this moment the following information can be provided via WAL archive catalog: timeline ID, parent timeline ID, switchpoint LSN, min/max segments, number of segments, resident size, compression ratio, number of backups, lost segments intervals.
    • Option '--archive' allows to view to WAL archive catalog, 'plain' and 'json' formats are supported. Can be used with 'show' command.
  • Backup Pinning. Now it is possible to exclude a backup from established retention policy or, in other words, 'pin' it for a specified amount of time by setting 'expire-time' attribute. Already existing backup can be pinned by using new command 'set-backup'. Backup can also be pinned at the moment of creation by providing additional parameters to the 'backup' command.
    • Command 'set-backup' can be used for overwriting backup meta info. For now it can be used only for pinning or unpinning.
    • Option '--ttl' can be used to pin a backup for a specified amount of time. For example, '--ttl=30d' will pin a backup for 30 days. Can be used with 'set-backup' and 'backup' commands.
    • Option '--expire-time' can be used to pin a backup until the specified date. For example, "--expire-time='2020-01-01 00:00:01+03'". Can be used with 'set-backup' and 'backup' commands.
  • WAL retention. Now it is possible to set 'a depth' of stored WAL archive measured in backups per timeline.
    • Option '--wal-depth' can be used to determine the number of latest valid backups per timeline that must retain the ability to perform PITR. WAL segments that cannot be applied to this backups will be removed by retention purge. WAL segments that are required by ARCHIVE backup for consistent recovery will be retained. Can be used with 'set-config', 'backup' and 'delete' command.
  • Partial restore. Now it is possible to restore only the specified databases or exclude the specified databases from restore using additional options with the 'restore' command. Databases 'template0' and 'template1' are always restored and cannot be explicitly excluded from restore. New options '--db-exclude' and '--db-include' cannot be used together.
    • Option '--db-include' allows to specify a database name to restore. Can be specified multiple times. All other databases will be skipped (with exception of 'template0' and 'template1'). Can be used with 'restore' command.
    • Options '--db-exclude' allows to specify a database name to exclude from restore. Can be specified multiple times. All other databases will be restored. Databases 'template0' and 'template1' cannot be excluded. Can be used with 'restore' command.
  • Archive host options. Now it is possible to specify ssh credentials of a host with WAL archive during restore, so the PostgreSQL parameter 'restore_command' can be generated correctly.
    • Option '--archive-host' can be used to set value for --remote-host parameter of archive-get command. Can be used with 'restore' and 'set-config' commands.
    • Option '--archive-port' can be used to set value for --remote-port parameter of 'archive-get' command. Can be used with 'restore' and 'set-config' commands.
    • Option '--archive-user' can be used to set value for --remote-user parameter of 'archive-get' command. Can be used with 'restore' and 'set-config' commands.
    • Option '--restore-command' can be used to set entire 'restore_command'. Can be used with 'restore' and 'set-config' commands.

Improvements:

  • '--dry-run' flag is now honored by a WAL purge and a deletion of a specific backup.
  • 'archive-push' command now use '.part' suffix for partially copied WAL segment instead of '.partial' to avoid collisions with '.partial' files produced by standby promotion.
  • timeline ID now obtained via pg_control_checkpoint() instead of pg_control file.
  • backup catalog in 'plain' format now has several changes:
    • column 'Current/Parent TLI' was renamed to 'TLI'
    • new column 'Zratio' contain compression ratio for compressed backups calculated as 'uncompressed-bytes' / 'data_bytes'
    • column 'WAL' was renamed to 'WAL Mode'
    • new column 'WAL' now contain the size of uncompressed WAL segments, required by the backup to reach consistency
  • backup meta information now has several new attributes:
    • 'pgdata-size' contain PostgreSQL PGDATA size at the time backup was taken, this attribute can be used to determine the effectiveness of incremental backup
    • 'uncompressed-size' contain the total size of backup data files before compression is applied, this attribute can be used to determine the effectiveness of compression
    • 'expire-time' contain the expiration date if backup is pinned
  • documentation has several new sections:

Bugfixes:

  • WAL purge now has timeline awareness, previously it was possible for WAL purge to unintentionally delete branched child timeline
  • merge of compressed backups on multiple threads now works correctly. Reported by Alexander Nikitin
  • handling of invalid stop_lsn is improved. Reported by Alexander Nikitin
  • SIGTERM and SIGINT are now handled correctly
  • now recovery.conf is generated if '--recovery-target=immediate' is used
  • after-backup validation now reports corruption corretly. Reported By Yuri Kurenkov
  • backup attribute 'recovery-xid' now calculated correctly
  • now non-ISO datestyle formats of PostgreSQL cluster are handled correctly
  • WAL purge now work correctly if oldest backup has invalid status. Reported by Alex Ignatov
  • retention purge now correctly handles invalid backups. Reported by Alex Ignatov
  • previously timeout for WAL streaming was always equal to zero, now its value depends on --archive-timeout parameter. Reported by Alex Ignatov
  • previously using of --recovery-target-lsn option lead to validation of all backups, now validation of PITR is performed. Reported by Alexey Shishkin
  • now only valid backups can be used for PITR and validation of PITR. Reported by Alexey Shishkin
  • 'pg_probackup --version' now prints version into stdout instead of stderr