Fix issues with leftover spool files from a prior restore.

A notification left in the spool path by a prior restore could make archive-get report a WAL segment as missing. When this notification is found on the first check, it is now removed and the async process is run again. An error is reported when the async process does not respond, rather than reporting the WAL segment as missing.

Fix issue when checking links for large numbers of tablespaces.

The link check used a lot of memory with many tablespaces and could crash. The new check is much faster, uses far less memory, and also detects duplicate file links.

Free no longer needed remotes so they do not timeout during restore.

The connections to remotes were held for the whole restore and could time out, which logged a harmless but distracting warning at the end of a long restore. They are now closed after the manifest is loaded.

Fix help when a valid option is invalid for the specified command.

help segfaulted when asked about an option that is not valid for the command.

Add PostgreSQL 14 support.

14 needs no code changes from 13. The catalog version may now change during the beta/rc period without requiring a new release.

Add automatic GCS authentication for GCE instances.

Set repo-gcs-key-type=auto to get the authentication token from the instance metadata on a GCE instance.

Add repo-retention-history option to expire backup history.

Set the number of days of backup history to keep. By default all history is kept, and history for backups still in the repository is never expired. When a full backup manifest expires, the manifests of its differential and incremental backups expire as well.

Add db-exclude option.

Restore excludes the specified databases by writing them as sparse, zeroed files. can still perform recovery, and the databases can be dropped after recovery. With db-include, db-exclude applies only to the system databases template0, template1, and postgres.

Change archive expiration logging from detail to info level.

Remove stanza archive spool path on restore.

Files in the spool path could interfere with the new cluster, e.g. old archive-push acknowledgements could make it skip archiving WAL.

Do not write files atomically or sync paths during backup copy.

Atomic writes are not needed since checksums are validated when a failed backup is resumed, and all paths are synced at the end of the backup.

Replace getopt_long() with custom implementation.

Add help for all internal options valid for default roles.

Add StringId type.

Add local process shim.

Add cfgOptionDisplay()/cfgOptionIdxDisplay().

Revert to checking catalog version for all versions.

Rename default command role to main.

Simplify defaults for --force option.

Refactor modules with inline getters/setters.

Clean up code and comments.

Update config.sub to latest version.

Update contributing documentation.

The contributing guide has more examples of how to write code, add configuration options, and test.

Consolidate RHEL/CentOS user guide into a single document.

The second guide existed mainly to document stop-auto for <= 9.5, which is now EOL. The option is still documented in the reference.

Clarify that repo-s3-role is not an ARN.

Update the user guide and release documentation.

Improve test harness macros.

Improve unit tests and test tools.

CI updates.