@@ -628,11 +628,10 @@ postgres 27093 0.0 0.0 30096 2752 ? Ss 11:34 0:00 postgres: ser
628
628
</row>
629
629
630
630
<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.
636
635
</entry>
637
636
</row>
638
637
@@ -3063,23 +3062,20 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
3063
3062
3064
3063
</sect2>
3065
3064
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>
3068
3067
3069
3068
<indexterm>
3070
- <primary>pg_stat_subscription_workers </primary>
3069
+ <primary>pg_stat_subscription_stats </primary>
3071
3070
</indexterm>
3072
3071
3073
3072
<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.
3079
3075
</para>
3080
3076
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>
3083
3079
<tgroup cols="1">
3084
3080
<thead>
3085
3081
<row>
@@ -3113,72 +3109,31 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
3113
3109
3114
3110
<row>
3115
3111
<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>
3117
3113
</para>
3118
3114
<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
3131
3116
</para></entry>
3132
3117
</row>
3133
3118
3134
3119
<row>
3135
3120
<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>
3137
3122
</para>
3138
3123
<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
3141
3126
</para></entry>
3142
3127
</row>
3143
3128
3144
3129
<row>
3145
3130
<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>
3176
3132
</para>
3177
3133
<para>
3178
- Last time at which this error occurred
3134
+ Time at which these statistics were last reset
3179
3135
</para></entry>
3180
3136
</row>
3181
-
3182
3137
</tbody>
3183
3138
</tgroup>
3184
3139
</table>
@@ -5320,22 +5275,16 @@ SELECT pid, wait_event_type, wait_event FROM pg_stat_activity WHERE wait_event i
5320
5275
<row>
5321
5276
<entry role="func_table_entry"><para role="func_signature">
5322
5277
<indexterm>
5323
- <primary>pg_stat_reset_subscription_worker </primary>
5278
+ <primary>pg_stat_reset_subscription_stats </primary>
5324
5279
</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> )
5326
5281
<returnvalue>void</returnvalue>
5327
5282
</para>
5328
5283
<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.
5339
5288
</para>
5340
5289
<para>
5341
5290
This function is restricted to superusers by default, but other users
0 commit comments