/
Ao
/
MaxReport
Обзор
Документация
Войти
/
Ao
/
MaxReport
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
pgsql/doc/src/sgml/html/logicaldecoding.html
27 строк
7 KB
AoAnima
first_commit
13 июл 2026, 17:47
13 июл 2026, 17:47
f1a670a
Код
Авторство
О чём код?
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!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 47. 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 Vsnapshot" /><link rel="prev" href="bgworker.html" title="Chapter 46. Background Worker Processes" /><link rel="next" href="logicaldecoding-example.html" title="47.1. Logical Decoding Examples" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">Chapter 47. Logical Decoding</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="bgworker.html" title="Chapter 46. 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 18.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="logicaldecoding-example.html" title="47.1. Logical Decoding Examples">Next</a></td></tr></table><hr /></div><div class="chapter" id="LOGICALDECODING"><div class="titlepage"><div><div><h2 class="title">Chapter 47. 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">47.1. Logical Decoding Examples</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-explanation.html">47.2. Logical Decoding Concepts</a></span></dt><dd><dl><dt><span class="sect2"><a href="logicaldecoding-explanation.html#LOGICALDECODING-EXPLANATION-LOG-DEC">47.2.1. Logical Decoding</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-explanation.html#LOGICALDECODING-REPLICATION-SLOTS">47.2.2. Replication Slots</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-explanation.html#LOGICALDECODING-REPLICATION-SLOTS-SYNCHRONIZATION">47.2.3. Replication Slot Synchronization</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-explanation.html#LOGICALDECODING-EXPLANATION-OUTPUT-PLUGINS">47.2.4. Output Plugins</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-explanation.html#LOGICALDECODING-EXPLANATION-EXPORTED-SNAPSHOTS">47.2.5. Exported Snapshots</a></span></dt></dl></dd><dt><span class="sect1"><a href="logicaldecoding-walsender.html">47.3. Streaming Replication Protocol Interface</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-sql.html">47.4. Logical Decoding <acronym class="acronym">SQL</acronym> Interface</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-catalogs.html">47.5. System Catalogs Related to Logical Decoding</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-output-plugin.html">47.6. Logical Decoding Output Plugins</a></span></dt><dd><dl><dt><span class="sect2"><a href="logicaldecoding-output-plugin.html#LOGICALDECODING-OUTPUT-INIT">47.6.1. Initialization Function</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-output-plugin.html#LOGICALDECODING-CAPABILITIES">47.6.2. Capabilities</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-output-plugin.html#LOGICALDECODING-OUTPUT-MODE">47.6.3. Output Modes</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-output-plugin.html#LOGICALDECODING-OUTPUT-PLUGIN-CALLBACKS">47.6.4. Output Plugin Callbacks</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-output-plugin.html#LOGICALDECODING-OUTPUT-PLUGIN-OUTPUT">47.6.5. Functions for Producing Output</a></span></dt></dl></dd><dt><span class="sect1"><a href="logicaldecoding-writer.html">47.7. Logical Decoding Output Writers</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-synchronous.html">47.8. Synchronous Replication Support for Logical Decoding</a></span></dt><dd><dl><dt><span class="sect2"><a href="logicaldecoding-synchronous.html#LOGICALDECODING-SYNCHRONOUS-OVERVIEW">47.8.1. Overview</a></span></dt><dt><span class="sect2"><a href="logicaldecoding-synchronous.html#LOGICALDECODING-SYNCHRONOUS-CAVEATS">47.8.2. Caveats</a></span></dt></dl></dd><dt><span class="sect1"><a href="logicaldecoding-streaming.html">47.9. Streaming of Large Transactions for Logical Decoding</a></span></dt><dt><span class="sect1"><a href="logicaldecoding-two-phase-commits.html">47.10. Two-phase Commit Support for Logical Decoding</a></span></dt></dl></div><a id="id-1.8.14.2" class="indexterm"></a><p> PostgreSQL provides infrastructure to stream the modifications performed via SQL to external consumers. This functionality can be used for a variety of purposes, including replication solutions and auditing. </p><p> Changes are sent out in streams identified by logical replication slots. </p><p> The format in which those changes are streamed is determined by the output plugin used. An example plugin is provided in the PostgreSQL distribution. Additional plugins can be written to extend the choice of available formats without modifying any core code. Every output plugin has access to each individual new row produced by <code class="command">INSERT</code> and the new row version created by <code class="command">UPDATE</code>. Availability of old row versions for <code class="command">UPDATE</code> and <code class="command">DELETE</code> depends on the configured replica identity (see <a class="xref" href="sql-altertable.html#SQL-ALTERTABLE-REPLICA-IDENTITY"><code class="literal">REPLICA IDENTITY</code></a>). </p><p> Changes can be consumed either using the streaming replication protocol (see <a class="xref" href="protocol-replication.html" title="54.4. Streaming Replication Protocol">Section 54.4</a> and <a class="xref" href="logicaldecoding-walsender.html" title="47.3. Streaming Replication Protocol Interface">Section 47.3</a>), or by calling functions via SQL (see <a class="xref" href="logicaldecoding-sql.html" title="47.4. Logical Decoding SQL Interface">Section 47.4</a>). It is also possible to write additional methods of consuming the output of a replication slot without modifying core code (see <a class="xref" href="logicaldecoding-writer.html" title="47.7. Logical Decoding Output Writers">Section 47.7</a>). </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bgworker.html" title="Chapter 46. Background Worker Processes">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="server-programming.html" title="Part V. Server Programming">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="logicaldecoding-example.html" title="47.1. Logical Decoding Examples">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 46. Background Worker Processes </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 18.4 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 47.1. Logical Decoding Examples</td></tr></table></div></body></html>