GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Home
  • About
  • Download
  • Documentation
  • Community
  • Developers
  • Support
  • Donate
  • Your account

This view

  • Original page
  • New address

GeezerVison is showing www.postgresql.org — Chapter 49. Logical Decoding

November 19, 2026: PostgreSQL 19 Released!
Documentation → PostgreSQL 11
Supported Versions: Current (19) / 18 / 17 / 16 / 15
Development Versions: devel
Unsupported versions: 14 / 13 / 12 / 11 / 10 / 9.6 / 9.5 / 9.4
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.
Chapter 49. Logical Decoding
Prev  Up Part V. Server Programming Home  Next

Chapter 49. Logical Decoding

Table of Contents

49.1. Logical Decoding Examples
49.2. Logical Decoding Concepts
49.2.1. Logical Decoding
49.2.2. Replication Slots
49.2.3. Output Plugins
49.2.4. Exported Snapshots
49.3. Streaming Replication Protocol Interface
49.4. Logical Decoding SQL Interface
49.5. System Catalogs Related to Logical Decoding
49.6. Logical Decoding Output Plugins
49.6.1. Initialization Function
49.6.2. Capabilities
49.6.3. Output Modes
49.6.4. Output Plugin Callbacks
49.6.5. Functions for Producing Output
49.7. Logical Decoding Output Writers
49.8. Synchronous Replication Support for Logical Decoding
49.8.1. Overview
49.8.2. Caveats

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.

Changes are sent out in streams identified 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 configured replica identity (see REPLICA IDENTITY).

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


Prev  Up  Next
Chapter 48. Background Worker Processes  Home  49.1. Logical Decoding Examples
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.