This guide explains the differences between pgoutput and pglogical for developers configuring a source. Both deliver the same transaction and checkpoint contract to the sink.

Source decoderSelect the decoder and its tablesCapabilities
pgoutputDefault. Pass publication: as one name or a list.Logical-decoding messages, in-progress transaction streaming, disk spill and failover slots.
pglogical_outputPass decoder: :pglogical and replication_sets:.Replication-set column lists and row filters that can call user-defined functions.

For pgoutput, every named publication must exist. Overlapping publications deliver a table's changes once. Use matching column lists for a table in multiple publications. See snapshot coverage for how the decoders combine row filters.

Provide a replica identity for tables that publish updates or deletes. pgoutput rejects writes that need an identity the table lacks. pglogical requires an identity index for tables in sets that replicate updates or deletes. Both emit relation metadata after DDL. By default, a dropped column halts the pipeline as a destructive schema change.

Replicant rejects options a decoder cannot express with :decoder_capability_unsupported. See compatibility for server and plugin requirements.

Filter by replication origin

Use origin: :none to stream locally originated changes, or origin: :any to stream changes from every origin. The source output plugin applies the filter. In pgoutput, it also applies to logical-decoding messages.

Decoderorigin omittedorigin: :anyorigin: :none
:pgoutputAll originsUses the server default with no wire option.Sends origin 'none' on PostgreSQL 16 or later.
:pglogicalLocal changesSends "pglogical.forward_origins" 'all'.Sends "pglogical.forward_origins" ''.

Check snapshot coverage before seeding a local-only pipeline. Follow the cutover steps before changing the mode on an existing slot.