Hi,
While looking into the backup and recovery code, I found small documentation
bugs.
The documatation says that the backup history files can be requested for
recovery,
but it's not used by the system and not requested anymore since PG 9.0
(commit 06f82b29616cd9effcaefd99c6b6e2e80697482f) and never be requested.
Attached patch (doc_backup_history_file.patch) corrects the description about
this.
In addition, the current pg_standby still can handle a backup history file that
are
never requested. It is harmless but unnecessary code. Another attached patch
(pg_standby.patch) removes this part of code.
Regards,
--
Yugo Nagata <[email protected]>
diff --git a/contrib/pg_standby/pg_standby.c b/contrib/pg_standby/pg_standby.c
index cb78597..d957f44 100644
--- a/contrib/pg_standby/pg_standby.c
+++ b/contrib/pg_standby/pg_standby.c
@@ -211,15 +211,9 @@ CustomizableNextWALFileReady(void)
}
/*
- * If it's a backup file, return immediately. If it's a regular file
* return only if it's the right size already.
*/
- if (IsBackupHistoryFileName(nextWALFileName))
- {
- nextWALFileType = XLOG_BACKUP_LABEL;
- return true;
- }
- else if (WalSegSz > 0 && stat_buf.st_size == WalSegSz)
+ if (WalSegSz > 0 && stat_buf.st_size == WalSegSz)
{
#ifdef WIN32
diff --git a/doc/src/sgml/backup.sgml b/doc/src/sgml/backup.sgml
index 982776c..3fa5efd 100644
--- a/doc/src/sgml/backup.sgml
+++ b/doc/src/sgml/backup.sgml
@@ -1288,7 +1288,7 @@ restore_command = 'cp /mnt/server/archivedir/%f %p'
<para>
Not all of the requested files will be WAL segment
files; you should also expect requests for files with a suffix of
- <literal>.backup</literal> or <literal>.history</literal>. Also be aware that
+ <literal>.history</literal>. Also be aware that
the base name of the <literal>%p</literal> path will be different from
<literal>%f</literal>; do not expect them to be interchangeable.
</para>
diff --git a/doc/src/sgml/high-availability.sgml b/doc/src/sgml/high-availability.sgml
index 46bf198..934eb90 100644
--- a/doc/src/sgml/high-availability.sgml
+++ b/doc/src/sgml/high-availability.sgml
@@ -1524,7 +1524,7 @@ synchronous_standby_names = 'ANY 2 (s1, s2, s3)'
processing would request a file from the WAL archive, reporting failure
if the file was unavailable. For standby processing it is normal for
the next WAL file to be unavailable, so the standby must wait for
- it to appear. For files ending in <literal>.backup</literal> or
+ it to appear. For files ending in
<literal>.history</literal> there is no need to wait, and a non-zero return
code must be returned. A waiting <varname>restore_command</varname> can be
written as a custom script that loops after polling for the existence of