1
- <!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.86 2006/09/16 00:30:11 momjian Exp $ -->
1
+ <!-- $PostgreSQL: pgsql/doc/src/sgml/backup.sgml,v 2.87 2006/09/19 15:18:41 neilc Exp $ -->
2
2
3
3
<chapter id="backup">
4
4
<title>Backup and Restore</title>
@@ -614,10 +614,10 @@ archive_command = 'test ! -f .../%f && cp %p .../%f'
614
614
615
615
<para>
616
616
Also, you can force a segment switch manually with
617
- <function>pg_switch_xlog() </>,
618
- if you want to ensure that a just-finished transaction is archived
619
- immediately. Other utility functions related to WAL management are
620
- listed in <xref linkend="functions-admin-backup-table">.
617
+ <function>pg_switch_xlog</>, if you want to ensure that a
618
+ just-finished transaction is archived immediately. Other utility
619
+ functions related to WAL management are listed in <xref
620
+ linkend="functions-admin-backup-table">.
621
621
</para>
622
622
</sect2>
623
623
@@ -666,15 +666,22 @@ SELECT pg_start_backup('label');
666
666
<programlisting>
667
667
SELECT pg_stop_backup();
668
668
</programlisting>
669
- This should return successfully.
669
+ This should return successfully; however, the backup is not yet fully
670
+ valid. An automatic switch to the next WAL segment occurs, so all
671
+ WAL segment files that relate to the backup will now be marked ready for
672
+ archiving.
670
673
</para>
671
674
</listitem>
672
675
<listitem>
673
676
<para>
674
- Once the WAL segment files used during the backup are archived as part
675
- of normal database activity, you are done. The file identified by
676
- <function>pg_stop_backup</>'s result is the last segment that needs
677
- to be archived to complete the backup.
677
+ Once the WAL segment files used during the backup are archived, you are
678
+ done. The file identified by <function>pg_stop_backup</>'s result is
679
+ the last segment that needs to be archived to complete the backup.
680
+ Archival of these files will happen automatically, since you have
681
+ already configured <varname>archive_command</>. In many cases, this
682
+ happens fairly quickly, but you are advised to monitor your archival
683
+ system to ensure this has taken place so that you can be certain you
684
+ have a valid backup.
678
685
</para>
679
686
</listitem>
680
687
</orderedlist>
@@ -701,9 +708,15 @@ SELECT pg_stop_backup();
701
708
It is not necessary to be very concerned about the amount of time elapsed
702
709
between <function>pg_start_backup</> and the start of the actual backup,
703
710
nor between the end of the backup and <function>pg_stop_backup</>; a
704
- few minutes' delay won't hurt anything. You
705
- must however be quite sure that these operations are carried out in
706
- sequence and do not overlap.
711
+ few minutes' delay won't hurt anything. However, if you normally run the
712
+ server with <varname>full_page_writes</> disabled, you may notice a drop
713
+ in performance between <function>pg_start_backup</> and
714
+ <function>pg_stop_backup</>. You must ensure that these backup operations
715
+ are carried out in sequence without any possible overlap, or you will
716
+ invalidate the backup.
717
+ </para>
718
+
719
+ <para>
707
720
</para>
708
721
709
722
<para>
@@ -1437,20 +1450,22 @@ if (!triggered)
1437
1450
<title>Failover</title>
1438
1451
1439
1452
<para>
1440
- If the Primary Server fails then the Standby Server should take begin
1453
+ If the Primary Server fails then the Standby Server should begin
1441
1454
failover procedures.
1442
1455
</para>
1443
1456
1444
1457
<para>
1445
1458
If the Standby Server fails then no failover need take place. If the
1446
- Standby Server can be restarted, then the recovery process can also be
1447
- immediately restarted, taking advantage of Restartable Recovery.
1459
+ Standby Server can be restarted, even some time later, then the recovery
1460
+ process can also be immediately restarted, taking advantage of
1461
+ Restartable Recovery. If the Standby Server cannot be restarted, then a
1462
+ full new Standby Server should be created.
1448
1463
</para>
1449
1464
1450
1465
<para>
1451
1466
If the Primary Server fails and then immediately restarts, you must have
1452
1467
a mechanism for informing it that it is no longer the Primary. This is
1453
- sometimes known as STONITH (Should the Other Node In The Head), which is
1468
+ sometimes known as STONITH (Shoot the Other Node In The Head), which is
1454
1469
necessary to avoid situations where both systems think they are the
1455
1470
Primary, which can lead to confusion and ultimately data loss.
1456
1471
</para>
@@ -1479,23 +1494,25 @@ if (!triggered)
1479
1494
</para>
1480
1495
1481
1496
<para>
1482
- So, switching from Primary to Standby Server can be fast, but requires
1497
+ So, switching from Primary to Standby Server can be fast but requires
1483
1498
some time to re-prepare the failover cluster. Regular switching from
1484
1499
Primary to Standby is encouraged, since it allows the regular downtime
1485
- one each system required to maintain HA. This also acts as a test of the
1486
- failover so that it definitely works when you really need it. Written
1487
- administration procedures are advised.
1500
+ that each system requires to maintain HA. This also acts as a test of the
1501
+ failover mechanism so that it definitely works when you really need it.
1502
+ Written administration procedures are advised.
1488
1503
</para>
1489
1504
</sect2>
1490
1505
1491
1506
<sect2 id="warm-standby-record">
1492
1507
<title>Implementing Record-based Log Shipping</title>
1493
1508
1494
1509
<para>
1495
- The main features for Log Shipping in this release are based around the
1496
- file-based Log Shipping described above. It is also possible to
1497
- implement record-based Log Shipping using the pg_xlogfile_name_offset()
1498
- function, though this requires custom development.
1510
+ The main features for Log Shipping in this release are based
1511
+ around the file-based Log Shipping described above. It is also
1512
+ possible to implement record-based Log Shipping using the
1513
+ <function>pg_xlogfile_name_offset</function> function (see <xref
1514
+ linkend="functions-admin">), though this requires custom
1515
+ development.
1499
1516
</para>
1500
1517
1501
1518
<para>
0 commit comments