gooderp18绿色标准版
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

27 行
6.4KB

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Chapter 48. Logical Decoding</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="bgworker.html" title="Chapter 47. Background Worker Processes" /><link rel="next" href="logicaldecoding-example.html" title="48.1. Logical Decoding Examples" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">Chapter 48. Logical Decoding</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="bgworker.html" title="Chapter 47. Background Worker Processes">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="server-programming.html" title="Part V. Server Programming">Up</a></td><th width="60%" align="center">Part V. Server Programming</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 12.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="logicaldecoding-example.html" title="48.1. Logical Decoding Examples">Next</a></td></tr></table><hr></hr></div><div class="chapter" id="LOGICALDECODING"><div class="titlepage"><div><div><h2 class="title">Chapter 48. Logical Decoding</h2></div></div></div><div class="toc"><p><strong>Table of Contents</strong></p><dl class="toc"><dt><span class="sect1"><a href="logicaldecoding-example.html">48.1. Logical Decoding Examples</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-explanation.html">48.2. Logical Decoding Concepts</a></span></dt><dd><dl><dt><span class="sect2"><a href="logicaldecoding-explanation.html#id-1.8.14.8.2">48.2.1. Logical Decoding</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-explanation.html#LOGICALDECODING-REPLICATION-SLOTS">48.2.2. Replication Slots</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-explanation.html#id-1.8.14.8.4">48.2.3. Output Plugins</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-explanation.html#id-1.8.14.8.5">48.2.4. Exported Snapshots</a></span></dt></dl></dd><dt><span class="sect1"><a href="logicaldecoding-walsender.html">48.3. Streaming Replication Protocol Interface</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-sql.html">48.4. Logical Decoding <acronym class="acronym">SQL</acronym> Interface</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-catalogs.html">48.5. System Catalogs Related to Logical Decoding</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-output-plugin.html">48.6. Logical Decoding Output Plugins</a></span></dt><dd><dl><dt><span class="sect2"><a href="logicaldecoding-output-plugin.html#LOGICALDECODING-OUTPUT-INIT">48.6.1. Initialization Function</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-output-plugin.html#LOGICALDECODING-CAPABILITIES">48.6.2. Capabilities</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-output-plugin.html#LOGICALDECODING-OUTPUT-MODE">48.6.3. Output Modes</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-output-plugin.html#LOGICALDECODING-OUTPUT-PLUGIN-CALLBACKS">48.6.4. Output Plugin Callbacks</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-output-plugin.html#LOGICALDECODING-OUTPUT-PLUGIN-OUTPUT">48.6.5. Functions for Producing Output</a></span></dt></dl></dd><dt><span class="sect1"><a href="logicaldecoding-writer.html">48.7. Logical Decoding Output Writers</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-synchronous.html">48.8. Synchronous Replication Support for Logical Decoding</a></span></dt></dl></div><a id="id-1.8.14.2" class="indexterm"></a><p>
  3. PostgreSQL provides infrastructure to stream the modifications performed
  4. via SQL to external consumers. This functionality can be used for a
  5. variety of purposes, including replication solutions and auditing.
  6. </p><p>
  7. Changes are sent out in streams identified by logical replication slots.
  8. </p><p>
  9. The format in which those changes are streamed is determined by the output
  10. plugin used. An example plugin is provided in the PostgreSQL distribution.
  11. Additional plugins can be
  12. written to extend the choice of available formats without modifying any
  13. core code.
  14. Every output plugin has access to each individual new row produced
  15. by <code class="command">INSERT</code> and the new row version created
  16. by <code class="command">UPDATE</code>. Availability of old row versions for
  17. <code class="command">UPDATE</code> and <code class="command">DELETE</code> depends on
  18. the configured replica identity (see <a class="xref" href="sql-altertable.html#SQL-CREATETABLE-REPLICA-IDENTITY"><code class="literal">REPLICA IDENTITY</code></a>).
  19. </p><p>
  20. Changes can be consumed either using the streaming replication protocol
  21. (see <a class="xref" href="protocol-replication.html" title="52.4. Streaming Replication Protocol">Section 52.4</a> and
  22. <a class="xref" href="logicaldecoding-walsender.html" title="48.3. Streaming Replication Protocol Interface">Section 48.3</a>), or by calling functions
  23. via SQL (see <a class="xref" href="logicaldecoding-sql.html" title="48.4. Logical Decoding SQL Interface">Section 48.4</a>). It is also possible
  24. to write additional methods of consuming the output of a replication slot
  25. without modifying core code
  26. (see <a class="xref" href="logicaldecoding-writer.html" title="48.7. Logical Decoding Output Writers">Section 48.7</a>).
  27. </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bgworker.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="server-programming.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="logicaldecoding-example.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 47. Background Worker Processes </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 48.1. Logical Decoding Examples</td></tr></table></div></body></html>
上海开阖软件有限公司 沪ICP备12045867号-1