From 3edaf29fa5e0d4fd6419c7eb73fd6df5b0406789 Mon Sep 17 00:00:00 2001 From: Amit Kapila Date: Tue, 18 Nov 2025 03:58:55 +0000 Subject: Rename two columns in pg_stat_subscription_stats. This patch renames the sync_error_count column to sync_table_error_count in the pg_stat_subscription_stats view. The new name makes the purpose explicit now that a separate column exists to track sequence synchronization errors. Additionally, the column seq_sync_error_count is renamed to sync_seq_error_count to maintain a consistent naming pattern, making it easier for users to group, and query synchronization related counters. Author: Vignesh C Reviewed-by: Peter Smith Reviewed-by: Chao Li Discussion: https://postgr.es/m/CALDaNm3WwJmz=-4ybTkhniB-Nf3qmFG9Zx1uKjyLLoPF5NYYXA@mail.gmail.com --- src/backend/utils/activity/pgstat_subscription.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/utils/activity/pgstat_subscription.c') diff --git a/src/backend/utils/activity/pgstat_subscription.c b/src/backend/utils/activity/pgstat_subscription.c index 35916772b9d..ad6814ec5ea 100644 --- a/src/backend/utils/activity/pgstat_subscription.c +++ b/src/backend/utils/activity/pgstat_subscription.c @@ -41,11 +41,11 @@ pgstat_report_subscription_error(Oid subid, LogicalRepWorkerType wtype) break; case WORKERTYPE_SEQUENCESYNC: - pending->seq_sync_error_count++; + pending->sync_seq_error_count++; break; case WORKERTYPE_TABLESYNC: - pending->sync_error_count++; + pending->sync_table_error_count++; break; default: @@ -131,8 +131,8 @@ pgstat_subscription_flush_cb(PgStat_EntryRef *entry_ref, bool nowait) #define SUB_ACC(fld) shsubent->stats.fld += localent->fld SUB_ACC(apply_error_count); - SUB_ACC(seq_sync_error_count); - SUB_ACC(sync_error_count); + SUB_ACC(sync_seq_error_count); + SUB_ACC(sync_table_error_count); for (int i = 0; i < CONFLICT_NUM_TYPES; i++) SUB_ACC(conflict_count[i]); #undef SUB_ACC -- cgit v1.2.3