Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
a6df0535
Commit
a6df0535
authored
May 14, 2009
by
Tom Lane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up overly hasty docs patch for pg_standby.
parent
f9701706
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
13 deletions
+30
-13
doc/src/sgml/pgstandby.sgml
doc/src/sgml/pgstandby.sgml
+30
-13
No files found.
doc/src/sgml/pgstandby.sgml
View file @
a6df0535
<!-- $PostgreSQL: pgsql/doc/src/sgml/pgstandby.sgml,v 2.
8 2009/05/14 20:31:09 heikki
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/pgstandby.sgml,v 2.
9 2009/05/14 21:59:22 tgl
Exp $ -->
<sect1 id="pgstandby">
<title>pg_standby</title>
...
...
@@ -93,20 +93,20 @@ pg_standby <optional> <replaceable>option</> ... </optional> <replaceable>archiv
the <replaceable>archivelocation</> directory must be writable too.
</para>
<para>
There are two ways to fail over
a <quote>warm standby</> database server.
You control the type of failover with the contents of the trigger file
:
There are two ways to fail over
to a <quote>warm standby</> database server
when the master server fails
:
<variablelist>
<varlistentry>
<term>Smart Failover</term>
<listitem>
<para>
In smart failover, the server is brought up after applying all
WAL files available in the archive. This results in zero data loss,
even if the standby server has fallen behind, but if there is a lot
unapplied WAL
the recovery can take a long time. To trigger a smart
failover, create a trigger file containing the word <literal>smart</>,
or just
leave it empty.
In smart failover, the server is brought up after applying all
WAL
files available in the archive. This results in zero data loss, even if
the standby server has fallen behind, but if there is a lot of
unapplied WAL
it can be a long time before the standby server becomes
ready. To trigger a smart failover, create a trigger file containing
the word <literal>smart</>, or just create it and
leave it empty.
</para>
</listitem>
</varlistentry>
...
...
@@ -117,7 +117,10 @@ pg_standby <optional> <replaceable>option</> ... </optional> <replaceable>archiv
In fast failover, the server is brought up immediately. Any WAL files
in the archive that have not yet been applied will be ignored, and
all transactions in those files are lost. To trigger a fast failover,
write the word <literal>fast</> into the trigger file.
create a trigger file and write the word <literal>fast</> into it.
<application>pg_standby</> can also be configured to execute a fast
failover automatically if no new WAL file appears within a defined
interval.
</para>
</listitem>
</varlistentry>
...
...
@@ -208,7 +211,7 @@ pg_standby <optional> <replaceable>option</> ... </optional> <replaceable>archiv
<entry><literal>-t</> <replaceable>triggerfile</></entry>
<entry>none</entry>
<entry>
Specify a trigger file whose presence should
perform
failover.
Specify a trigger file whose presence should
cause
failover.
It is recommended that you use a structured filename to
avoid confusion as to which server is being triggered
when multiple servers exist on the same system; for example
...
...
@@ -240,6 +243,7 @@ pg_standby <optional> <replaceable>option</> ... </optional> <replaceable>archiv
archive_command = 'cp %p .../archive/%f'
restore_command = 'pg_standby -l -d -s 2 -t /tmp/pgsql.trigger.5442 .../archive %f %p %r 2>>standby.log'
recovery_end_command = 'rm -f /tmp/pgsql.trigger.5442'
</programlisting>
<para>
...
...
@@ -289,11 +293,14 @@ recovery_end_command = 'rm -f /tmp/pgsql.trigger.5442'
archive_command = 'copy %p ...\\archive\\%f'
restore_command = 'pg_standby -d -s 5 -t C:\pgsql.trigger.5442 ...\archive %f %p %r 2>>standby.log'
recovery_end_command = 'del C:\pgsql.trigger.5442'
</programlisting>
<para>
Note that backslashes need to be doubled in the
<literal>archive_command</>, but <emphasis>not</emphasis> in the
<literal>restore_command</>. This will:
<literal>restore_command</> or <literal>recovery_end_command</>.
This will:
</para>
<itemizedlist>
<listitem>
...
...
@@ -318,6 +325,11 @@ restore_command = 'pg_standby -d -s 5 -t C:\pgsql.trigger.5442 ...\archive %f %p
and perform failover according to its content
</para>
</listitem>
<listitem>
<para>
remove the trigger file when recovery ends
</para>
</listitem>
<listitem>
<para>
remove no-longer-needed files from the archive directory
...
...
@@ -335,7 +347,7 @@ restore_command = 'pg_standby -d -s 5 -t C:\pgsql.trigger.5442 ...\archive %f %p
</para>
<para>
Using the
Since the Windows example uses <literal>copy</> at both ends, either
Since the Windows example uses <literal>copy</> at both ends, either
or both servers might be accessing the archive directory across the
network.
</para>
...
...
@@ -356,6 +368,11 @@ restore_command = 'pg_standby -d -s 5 -t C:\pgsql.trigger.5442 ...\archive %f %p
<literal>-k</literal> option must be used if archive cleanup is
required. This option remains available in 8.3, but its use is deprecated.
</para>
<para>
<productname>PostgreSQL</> 8.4 provides the
<literal>recovery_end_command</literal> option. Without this option
a leftover trigger file can be hazardous.
</para>
</sect2>
<sect2>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment