This commit improves the performance of page-level, or differential
backup, by not having to scan anymore all the pages of a relation file,
something that can be very long on large data sets, but by scanning the
list of blocks changed by WAL records since the last full or differential
backup.
As a restriction and to avoid potential data corruption should hint-bit
updates occur on a page, backups can only be taken from a server that has
wal_log_hints or data checksums enabled.
Base patch by Yury Zhuravlev, heavily modified by me.
-DFRONTEND should be overridden as part of CPPFLAGS and it is not really
necessary to have the source list. The definition of pg_arman.h was rather
obscure as well.
This new facility has the advantage on not relying on static data when
generating the tests making the whole facility more robust. This is
basically taken from the upstream project pg_rman and adapted for the
sake of this pet project, so most of the credit go to Kyotaro Horiguchi
and Amit Langote regarding this facility. However I have adapted a bunch
of things and fixed a lot of redundancy and code duplication.
This has the merit to put all the documentation of the project into a
single banner, and to centralize all the project in a single place at
code level.
Compiling documentation can be made by setting the variables ASCIIDOC
and XMLTO. As PostgreSQL extension system is not that smart for doc
generation, some custom Makefile path is used to install man pages into
a folder that could directly by used in MANPATH.
The system function used up to now was pg_xlogfile_name_offset, which
cannot be used on a node in recovery, and it was the only way present
to fetch the timeline ID of a backup, either incremental or full. So
instead scan the control file of server and fetch the timeline from
that. This also removes the restriction on which a backup could not
be taken on a standby node. The next step being to have the possibility
to take backups from streams.