@@ -628,11 +628,10 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
628628 </row>
629629
630630 <row>
631- <entry><structname>pg_stat_subscription_workers</structname><indexterm><primary>pg_stat_subscription_workers</primary></indexterm></entry>
632- <entry>One row per subscription worker, showing statistics about errors
633- that occurred on that subscription worker.
634- See <link linkend="monitoring-pg-stat-subscription-workers">
635- <structname>pg_stat_subscription_workers</structname></link> for details.
631+ <entry><structname>pg_stat_subscription_stats</structname><indexterm><primary>pg_stat_subscription_stats</primary></indexterm></entry>
632+ <entry>One row per subscription, showing statistics about errors.
633+ See <link linkend="monitoring-pg-stat-subscription-stats">
634+ <structname>pg_stat_subscription_stats</structname></link> for details.
636635 </entry>
637636 </row>
638637
@@ -3063,23 +3062,20 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
30633062
30643063 </sect2>
30653064
3066- <sect2 id="monitoring-pg-stat-subscription-workers ">
3067- <title><structname>pg_stat_subscription_workers </structname></title>
3065+ <sect2 id="monitoring-pg-stat-subscription-stats ">
3066+ <title><structname>pg_stat_subscription_stats </structname></title>
30683067
30693068 <indexterm>
3070- <primary>pg_stat_subscription_workers </primary>
3069+ <primary>pg_stat_subscription_stats </primary>
30713070 </indexterm>
30723071
30733072 <para>
3074- The <structname>pg_stat_subscription_workers</structname> view will contain
3075- one row per subscription worker on which errors have occurred, for workers
3076- applying logical replication changes and workers handling the initial data
3077- copy of the subscribed tables. The statistics entry is removed when the
3078- corresponding subscription is dropped.
3073+ The <structname>pg_stat_subscription_stats</structname> view will contain
3074+ one row per subscription.
30793075 </para>
30803076
3081- <table id="pg-stat-subscription-workers " xreflabel="pg_stat_subscription_workers ">
3082- <title><structname>pg_stat_subscription_workers </structname> View</title>
3077+ <table id="pg-stat-subscription-stats " xreflabel="pg_stat_subscription_stats ">
3078+ <title><structname>pg_stat_subscription_stats </structname> View</title>
30833079 <tgroup cols="1">
30843080 <thead>
30853081 <row>
@@ -3113,72 +3109,31 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
31133109
31143110 <row>
31153111 <entry role="catalog_table_entry"><para role="column_definition">
3116- <structfield>subrelid </structfield> <type>oid </type>
3112+ <structfield>apply_error_count </structfield> <type>bigint </type>
31173113 </para>
31183114 <para>
3119- OID of the relation that the worker is synchronizing; null for the
3120- main apply worker
3121- </para></entry>
3122- </row>
3123-
3124- <row>
3125- <entry role="catalog_table_entry"><para role="column_definition">
3126- <structfield>last_error_relid</structfield> <type>oid</type>
3127- </para>
3128- <para>
3129- OID of the relation that the worker was processing when the
3130- error occurred
3115+ Number of times an error occurred while applying changes
31313116 </para></entry>
31323117 </row>
31333118
31343119 <row>
31353120 <entry role="catalog_table_entry"><para role="column_definition">
3136- <structfield>last_error_command </structfield> <type>text </type>
3121+ <structfield>sync_error_count </structfield> <type>bigint </type>
31373122 </para>
31383123 <para>
3139- Name of command being applied when the error occurred. This field
3140- is null if the error was reported during the initial data copy.
3124+ Number of times an error occurred during the initial table
3125+ synchronization
31413126 </para></entry>
31423127 </row>
31433128
31443129 <row>
31453130 <entry role="catalog_table_entry"><para role="column_definition">
3146- <structfield>last_error_xid</structfield> <type>xid</type>
3147- </para>
3148- <para>
3149- Transaction ID of the publisher node being applied when the error
3150- occurred. This field is null if the error was reported
3151- during the initial data copy.
3152- </para></entry>
3153- </row>
3154-
3155- <row>
3156- <entry role="catalog_table_entry"><para role="column_definition">
3157- <structfield>last_error_count</structfield> <type>uint8</type>
3158- </para>
3159- <para>
3160- Number of consecutive times the error occurred
3161- </para></entry>
3162- </row>
3163-
3164- <row>
3165- <entry role="catalog_table_entry"><para role="column_definition">
3166- <structfield>last_error_message</structfield> <type>text</type>
3167- </para>
3168- <para>
3169- The error message
3170- </para></entry>
3171- </row>
3172-
3173- <row>
3174- <entry role="catalog_table_entry"><para role="column_definition">
3175- <structfield>last_error_time</structfield> <type>timestamp with time zone</type>
3131+ <structfield>stats_reset</structfield> <type>timestamp with time zone</type>
31763132 </para>
31773133 <para>
3178- Last time at which this error occurred
3134+ Time at which these statistics were last reset
31793135 </para></entry>
31803136 </row>
3181-
31823137 </tbody>
31833138 </tgroup>
31843139 </table>
@@ -5320,22 +5275,16 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
53205275 <row>
53215276 <entry role="func_table_entry"><para role="func_signature">
53225277 <indexterm>
5323- <primary>pg_stat_reset_subscription_worker </primary>
5278+ <primary>pg_stat_reset_subscription_stats </primary>
53245279 </indexterm>
5325- <function>pg_stat_reset_subscription_worker </function> ( <parameter>subid</parameter> < type>oid</type> <optional>, <parameter>relid</parameter> <type>oid</type> </optional > )
5280+ <function>pg_stat_reset_subscription_stats </function> ( <type>oid</type> )
53265281 <returnvalue>void</returnvalue>
53275282 </para>
53285283 <para>
5329- Resets the statistics of subscription workers running on the
5330- subscription with <parameter>subid</parameter> shown in the
5331- <structname>pg_stat_subscription_workers</structname> view. If the
5332- argument <parameter>relid</parameter> is not <literal>NULL</literal>,
5333- resets statistics of the subscription worker handling the initial data
5334- copy of the relation with <parameter>relid</parameter>. Otherwise,
5335- resets the subscription worker statistics of the main apply worker.
5336- If the argument <parameter>relid</parameter> is omitted, resets the
5337- statistics of all subscription workers running on the subscription
5338- with <parameter>subid</parameter>.
5284+ Resets statistics for a single subscription shown in the
5285+ <structname>pg_stat_subscription_stats</structname> view to zero. If
5286+ the argument is <literal>NULL</literal>, reset statistics for all
5287+ subscriptions.
53395288 </para>
53405289 <para>
53415290 This function is restricted to superusers by default, but other users
0 commit comments