]> begriffs open source - ai-pg/blob - full-docs/txt/logicaldecoding.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / logicaldecoding.txt
1
2 Chapter 47. Logical Decoding
3
4    Table of Contents
5
6    47.1. Logical Decoding Examples
7    47.2. Logical Decoding Concepts
8
9         47.2.1. Logical Decoding
10         47.2.2. Replication Slots
11         47.2.3. Replication Slot Synchronization
12         47.2.4. Output Plugins
13         47.2.5. Exported Snapshots
14
15    47.3. Streaming Replication Protocol Interface
16    47.4. Logical Decoding SQL Interface
17    47.5. System Catalogs Related to Logical Decoding
18    47.6. Logical Decoding Output Plugins
19
20         47.6.1. Initialization Function
21         47.6.2. Capabilities
22         47.6.3. Output Modes
23         47.6.4. Output Plugin Callbacks
24         47.6.5. Functions for Producing Output
25
26    47.7. Logical Decoding Output Writers
27    47.8. Synchronous Replication Support for Logical Decoding
28
29         47.8.1. Overview
30         47.8.2. Caveats
31
32    47.9. Streaming of Large Transactions for Logical Decoding
33    47.10. Two-phase Commit Support for Logical Decoding
34
35    PostgreSQL provides infrastructure to stream the modifications
36    performed via SQL to external consumers. This functionality can be used
37    for a variety of purposes, including replication solutions and
38    auditing.
39
40    Changes are sent out in streams identified by logical replication
41    slots.
42
43    The format in which those changes are streamed is determined by the
44    output plugin used. An example plugin is provided in the PostgreSQL
45    distribution. Additional plugins can be written to extend the choice of
46    available formats without modifying any core code. Every output plugin
47    has access to each individual new row produced by INSERT and the new
48    row version created by UPDATE. Availability of old row versions for
49    UPDATE and DELETE depends on the configured replica identity (see
50    REPLICA IDENTITY).
51
52    Changes can be consumed either using the streaming replication protocol
53    (see Section 54.4 and Section 47.3), or by calling functions via SQL
54    (see Section 47.4). It is also possible to write additional methods of
55    consuming the output of a replication slot without modifying core code
56    (see Section 47.7).