Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
postgres-lambda-diff
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jakob Huber
postgres-lambda-diff
Commits
a6df0535
Commit
a6df0535
authored
15 years ago
by
Tom Lane
Browse files
Options
Downloads
Patches
Plain Diff
Clean up overly hasty docs patch for pg_standby.
parent
f9701706
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/src/sgml/pgstandby.sgml
+30
-13
30 additions, 13 deletions
doc/src/sgml/pgstandby.sgml
with
30 additions
and
13 deletions
doc/src/sgml/pgstandby.sgml
+
30
−
13
View file @
a6df0535
<!-- $PostgreSQL: pgsql/doc/src/sgml/pgstandby.sgml,v 2.
8
2009/05/14 2
0:31:09 heikki
Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/pgstandby.sgml,v 2.
9
2009/05/14 2
1:59:22 tgl
Exp $ -->
<sect1 id="pgstandby">
<sect1 id="pgstandby">
<title>pg_standby</title>
<title>pg_standby</title>
...
@@ -93,20 +93,20 @@ pg_standby <optional> <replaceable>option</> ... </optional> <replaceable>archiv
...
@@ -93,20 +93,20 @@ pg_standby <optional> <replaceable>option</> ... </optional> <replaceable>archiv
the <replaceable>archivelocation</> directory must be writable too.
the <replaceable>archivelocation</> directory must be writable too.
</para>
</para>
<para>
<para>
There are two ways to fail over a <quote>warm standby</> database server
.
There are two ways to fail over
to
a <quote>warm standby</> database server
You control t
he t
ype of failover with the contents of the trigg
er fil
e
:
w
he
n
t
he master serv
er f
a
il
s
:
<variablelist>
<variablelist>
<varlistentry>
<varlistentry>
<term>Smart Failover</term>
<term>Smart Failover</term>
<listitem>
<listitem>
<para>
<para>
In smart failover, the server is brought up after applying all
In smart failover, the server is brought up after applying all
WAL
WAL
files available in the archive. This results in zero data loss,
files available in the archive. This results in zero data loss,
even if
even if
the standby server has fallen behind, but if there is a lot
the standby server has fallen behind, but if there is a lot
of
unapplied WAL t
he recovery
can
tak
e a long time
. To trigger a smart
unapplied WAL
i
t can
b
e a long time
before the standby server becomes
failover, create a trigger file containing
the word <literal>smart</>,
ready. To trigger a smart
failover, create a trigger file containing
or just
leave it empty.
the word <literal>smart</>, or just create it and
leave it empty.
</para>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
...
@@ -117,7 +117,10 @@ pg_standby <optional> <replaceable>option</> ... </optional> <replaceable>archiv
...
@@ -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 fast failover, the server is brought up immediately. Any WAL files
in the archive that have not yet been applied will be ignored, and
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,
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>
</para>
</listitem>
</listitem>
</varlistentry>
</varlistentry>
...
@@ -208,7 +211,7 @@ pg_standby <optional> <replaceable>option</> ... </optional> <replaceable>archiv
...
@@ -208,7 +211,7 @@ pg_standby <optional> <replaceable>option</> ... </optional> <replaceable>archiv
<entry><literal>-t</> <replaceable>triggerfile</></entry>
<entry><literal>-t</> <replaceable>triggerfile</></entry>
<entry>none</entry>
<entry>none</entry>
<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
It is recommended that you use a structured filename to
avoid confusion as to which server is being triggered
avoid confusion as to which server is being triggered
when multiple servers exist on the same system; for example
when multiple servers exist on the same system; for example
...
@@ -240,6 +243,7 @@ pg_standby <optional> <replaceable>option</> ... </optional> <replaceable>archiv
...
@@ -240,6 +243,7 @@ pg_standby <optional> <replaceable>option</> ... </optional> <replaceable>archiv
archive_command = 'cp %p .../archive/%f'
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'
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'
recovery_end_command = 'rm -f /tmp/pgsql.trigger.5442'
</programlisting>
</programlisting>
<para>
<para>
...
@@ -289,11 +293,14 @@ recovery_end_command = 'rm -f /tmp/pgsql.trigger.5442'
...
@@ -289,11 +293,14 @@ recovery_end_command = 'rm -f /tmp/pgsql.trigger.5442'
archive_command = 'copy %p ...\\archive\\%f'
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'
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>
</programlisting>
<para>
<para>
Note that backslashes need to be doubled in the
Note that backslashes need to be doubled in the
<literal>archive_command</>, but <emphasis>not</emphasis> 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>
</para>
<itemizedlist>
<itemizedlist>
<listitem>
<listitem>
...
@@ -318,6 +325,11 @@ restore_command = 'pg_standby -d -s 5 -t C:\pgsql.trigger.5442 ...\archive %f %p
...
@@ -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
and perform failover according to its content
</para>
</para>
</listitem>
</listitem>
<listitem>
<para>
remove the trigger file when recovery ends
</para>
</listitem>
<listitem>
<listitem>
<para>
<para>
remove no-longer-needed files from the archive directory
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
...
@@ -335,7 +347,7 @@ restore_command = 'pg_standby -d -s 5 -t C:\pgsql.trigger.5442 ...\archive %f %p
</para>
</para>
<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
or both servers might be accessing the archive directory across the
network.
network.
</para>
</para>
...
@@ -356,6 +368,11 @@ restore_command = 'pg_standby -d -s 5 -t C:\pgsql.trigger.5442 ...\archive %f %p
...
@@ -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
<literal>-k</literal> option must be used if archive cleanup is
required. This option remains available in 8.3, but its use is deprecated.
required. This option remains available in 8.3, but its use is deprecated.
</para>
</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>
<sect2>
<sect2>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment