mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Introduce Streaming Replication.
This includes two new kinds of postmaster processes, walsenders and walreceiver. Walreceiver is responsible for connecting to the primary server and streaming WAL to disk, while walsender runs in the primary server and streams WAL from disk to the client. Documentation still needs work, but the basics are there. We will probably pull the replication section to a new chapter later on, as well as the sections describing file-based replication. But let's do that as a separate patch, so that it's easier to see what has been added/changed. This patch also adds a new section to the chapter about FE/BE protocol, documenting the protocol used by walsender/walreceivxer. Bump catalog version because of two new functions, pg_last_xlog_receive_location() and pg_last_xlog_replay_location(), for monitoring the progress of replication. Fujii Masao, with additional hacking by me
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.495 2009/12/19 17:49:50 momjian Exp $ -->
|
||||
<!-- $PostgreSQL: pgsql/doc/src/sgml/func.sgml,v 1.496 2010/01/15 09:18:58 heikki Exp $ -->
|
||||
|
||||
<chapter id="functions">
|
||||
<title>Functions and Operators</title>
|
||||
@ -12984,7 +12984,8 @@ SELECT set_config('log_statement_stats', 'off', false);
|
||||
<para>
|
||||
The functions shown in <xref
|
||||
linkend="functions-admin-backup-table"> assist in making on-line backups.
|
||||
Use of the first three functions is restricted to superusers.
|
||||
Use of the first three functions is restricted to superusers. The first
|
||||
five functions cannot be executed during recovery.
|
||||
</para>
|
||||
|
||||
<table id="functions-admin-backup-table">
|
||||
@ -13135,11 +13136,17 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
|
||||
<indexterm>
|
||||
<primary>pg_is_in_recovery</primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary>pg_last_xlog_receive_location</primary>
|
||||
</indexterm>
|
||||
<indexterm>
|
||||
<primary>pg_last_xlog_replay_location</primary>
|
||||
</indexterm>
|
||||
|
||||
<para>
|
||||
The functions shown in <xref
|
||||
linkend="functions-recovery-info-table"> provide information
|
||||
about the current status of Hot Standby.
|
||||
about the current status of the standby.
|
||||
These functions may be executed during both recovery and in normal running.
|
||||
</para>
|
||||
|
||||
@ -13160,6 +13167,33 @@ postgres=# SELECT * FROM pg_xlogfile_name_offset(pg_stop_backup());
|
||||
<entry>True if recovery is still in progress.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>
|
||||
<literal><function>pg_last_xlog_receive_location</function>()</literal>
|
||||
</entry>
|
||||
<entry><type>text</type></entry>
|
||||
<entry>Get last transaction log location received and synced to disk during
|
||||
streaming recovery. If streaming recovery is still in progress
|
||||
this will increase monotonically. If streaming recovery has completed
|
||||
then this value will remain static at the value of the last WAL record
|
||||
received and synced to disk during that recovery. When the server has
|
||||
been started without a streaming recovery then the return value will be
|
||||
InvalidXLogRecPtr (0/0).
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>
|
||||
<literal><function>pg_last_xlog_replay_location</function>()</literal>
|
||||
</entry>
|
||||
<entry><type>text</type></entry>
|
||||
<entry>Get last transaction log location replayed during recovery.
|
||||
If recovery is still in progress this will increase monotonically.
|
||||
If recovery has completed then this value will remain static at
|
||||
the value of the last WAL record applied during that recovery.
|
||||
When the server has been started normally without a recovery
|
||||
then the return value will be InvalidXLogRecPtr (0/0).
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
Reference in New Issue
Block a user