You are on page 1of 1

9/17/2020 PostgreSQL: Documentation: 12: Chapter 48.

Logical Decoding

17th September 2020: PostgreSQL 13 RC 1 Released!

Documentation → PostgreSQL 12
Search the documentation for... 
Supported Versions: Current (12) / 11 / 10 / 9.6 / 9.5
Development Versions: 13 / devel
Unsupported versions: 9.4

Chapter 48. Logical Decoding
Prev  Up Part V. Server Programming Home  Next

Chapter 48. Logical Decoding
Table of Contents

48.1. Logical Decoding Examples


48.2. Logical Decoding Concepts
48.2.1. Logical Decoding
48.2.2. Replication Slots
48.2.3. Output Plugins
48.2.4. Exported Snapshots
48.3. Streaming Replication Protocol Interface
48.4. Logical Decoding SQL Interface
48.5. System Catalogs Related to Logical Decoding
48.6. Logical Decoding Output Plugins
48.6.1. Initialization Function
48.6.2. Capabilities
48.6.3. Output Modes
48.6.4. Output Plugin Callbacks
48.6.5. Functions for Producing Output
48.7. Logical Decoding Output Writers
48.8. Synchronous Replication Support for Logical Decoding

PostgreSQL provides infrastructure to stream the modi cations performed via SQL to external consumers. This functionality can be
used for a variety of purposes, including replication solutions and auditing.

Changes are sent out in streams identi ed by logical replication slots.

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 INSERT and the new row version created by UPDATE.
Availability of old row versions for UPDATE and DELETE depends on the con gured replica identity (see REPLICA IDENTITY).

Changes can be consumed either using the streaming replication protocol (see Section 52.4 and Section 48.3), or by calling functions
via SQL (see Section 48.4). It is also possible to write additional methods of consuming the output of a replication slot without
modifying core code (see Section 48.7).

Prev  Up  Next
Chapter 47. Background Worker Processes  Home  48.1. Logical Decoding Examples

Submit correction
 
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or
requires further clari cation, please use this form to report a documentation issue.

Privacy Policy | Code of Conduct | About PostgreSQL | Contact


Copyright © 1996-2020 The PostgreSQL Global Development Group

https://www.postgresql.org/docs/12/logicaldecoding.html 1/1

You might also like