Summary
The pg_stat_subscription_stats view will contain one row per subscription.
(Description quoted from the official PostgreSQL documentation.)
Columns
The pg_stat_subscription_stats statistics view exposes the following columns (names, types and descriptions are taken verbatim from the PostgreSQL documentation):
subidoid
OID of the subscriptionsubnamename
Name of the subscriptionapply_error_countbigint
Number of times an error occurred while applying changes. Note that any conflict resulting in an apply error will be counted in both apply_error_count and the corresponding conflict count (e.g., confl_*).sync_seq_error_countbigint
Number of times an error occurred in the sequence synchronization worker. A single worker synchronizes all sequences, so one error increment may represent failures across multiple sequences.sync_table_error_countbigint
Number of times an error occurred during the initial table synchronizationconfl_insert_existsbigint
Number of times a row insertion violated a NOT DEFERRABLE unique constraint during the application of changes. See conflict_insert_exists for details about this conflict.confl_update_origin_differsbigint
Number of times an update was applied to a row that had been previously modified by another source during the application of changes. See conflict_update_origin_differs for details about this conflict.confl_update_existsbigint
Number of times that an updated row value violated a NOT DEFERRABLE unique constraint during the application of changes. See conflict_update_exists for details about this conflict.confl_update_deletedbigint
Number of times the tuple to be updated was concurrently deleted by another source during the application of changes. See conflict_update_deleted for details about this conflict.confl_update_missingbigint
Number of times the tuple to be updated was not found during the application of changes. See conflict_update_missing for details about this conflict.confl_delete_origin_differsbigint
Number of times a delete operation was applied to row that had been previously modified by another source during the application of changes. See conflict_delete_origin_differs for details about this conflict.confl_delete_missingbigint
Number of times the tuple to be deleted was not found during the application of changes. See conflict_delete_missing for details about this conflict.confl_multiple_unique_conflictsbigint
Number of times a row insertion or an updated row values violated multiple NOT DEFERRABLE unique constraints during the application of changes. See conflict_multiple_unique_conflicts for details about this conflict.stats_resettimestamp with time zone
Time at which these statistics were last reset
Version applicability
Present in PostgreSQL 17, 18, 19 (verified against each release’s documentation). This is a long-standing system object that also exists in earlier PostgreSQL releases.
Related & references
Reference: PostgreSQL documentation — pg_stat_subscription_stats.