↑↓ select↵ open⌫ change scopeOpen full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

Wiki / System Catalogs

pg_stat_replication_slots

The pg_stat_replication_slots view will contain one row per logical replication slot, showing statistics about its usage.

English manual coverage begins with PostgreSQL 7.4. Source history and runtime observations have their own recorded version boundaries.

Reading PG 18·Select a recorded version

kind
statistics
lang
en
measured attributes
true
metadata release
18.6
runtime columns
slot_name, spill_txns, spill_count, spill_bytes, stream_txns, stream_count, stream_bytes, total_txns, total_bytes, stats_reset
runtime verified
false
source
english-manual

Definition PG 18

The pg_stat_replication_slots view will contain one row per logical replication slot, showing statistics about its usage.

Catalog columns

ColumnTypeNullabilityDescription
slot_nametextNullableA unique, cluster-wide identifier for the replication slot
spill_txnsbigintNullableNumber of transactions spilled to disk once the memory used by logical decoding to decode changes from WAL has exceeded logical_decoding_work_mem. The counter gets incremented for both top-level transactions and subtransactions.
spill_countbigintNullableNumber of times transactions were spilled to disk while decoding changes from WAL for this slot. This counter is incremented each time a transaction is spilled, and the same transaction may be spilled multiple times.
spill_bytesbigintNullableAmount of decoded transaction data spilled to disk while performing decoding of changes from WAL for this slot. This and other spill counters can be used to gauge the I/O which occurred during logical decoding and allow tuning logical_decoding_work_mem.
stream_txnsbigintNullableNumber of in-progress transactions streamed to the decoding output plugin after the memory used by logical decoding to decode changes from WAL for this slot has exceeded logical_decoding_work_mem. Streaming only works with top-level transactions (subtransactions can't be streamed independently), so the counter is not incremented for subtransactions.
stream_countbigintNullableNumber of times in-progress transactions were streamed to the decoding output plugin while decoding changes from WAL for this slot. This counter is incremented each time a transaction is streamed, and the same transaction may be streamed multiple times.
stream_bytesbigintNullableAmount of transaction data decoded for streaming in-progress transactions to the decoding output plugin while decoding changes from WAL for this slot. This and other streaming counters for this slot can be used to tune logical_decoding_work_mem.
total_txnsbigintNullableNumber of decoded transactions sent to the decoding output plugin for this slot. This counts top-level transactions only, and is not incremented for subtransactions. Note that this includes the transactions that are streamed and/or spilled.
total_bytesbigintNullableAmount of transaction data decoded for sending transactions to the decoding output plugin while decoding changes from WAL for this slot. Note that this includes data that is streamed and/or spilled.
stats_resettimestamp with time zoneNullableTime at which these statistics were last reset

Compare versions

Complete source facts

documentation revision

{"inputs":[{"file":"monitoring-stats.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"a97e4aa05484b41cec1f4c9b0b9c5a083596a056982e5d5ba0db1dd8d49961fb","version":"18.7"},{"file":"monitoring-stats.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"1ddb6576fe569e029a1c776c82e7add6be8e4f41705bcd8f66f4347fe23372b6","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"}

Source references

Full definition and evidence JSON

Definition sources

center · PostgreSQL 18 · catalog-bilingual-repair:cf88b7fa8f4819fffe83bf54075bdcc8a4cad338538d0b0ff34915e22aabe2f2

Text language: en · catalog-bilingual-repair:cf88b7fa8f4819fffe83bf54075bdcc8a4cad338538d0b0ff34915e22aabe2f2