mirror of
https://github.com/postgres/postgres.git
synced 2025-11-25 12:03:53 +03:00
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 <vignesh21@gmail.com> Reviewed-by: Peter Smith <smithpb2250@gmail.com> Reviewed-by: Chao Li <li.evan.chao@gmail.com> Discussion: https://postgr.es/m/CALDaNm3WwJmz=-4ybTkhniB-Nf3qmFG9Zx1uKjyLLoPF5NYYXA@mail.gmail.com
This commit is contained in:
@@ -2191,8 +2191,8 @@ pg_stat_subscription| SELECT su.oid AS subid,
|
||||
pg_stat_subscription_stats| SELECT ss.subid,
|
||||
s.subname,
|
||||
ss.apply_error_count,
|
||||
ss.seq_sync_error_count,
|
||||
ss.sync_error_count,
|
||||
ss.sync_seq_error_count,
|
||||
ss.sync_table_error_count,
|
||||
ss.confl_insert_exists,
|
||||
ss.confl_update_origin_differs,
|
||||
ss.confl_update_exists,
|
||||
@@ -2203,7 +2203,7 @@ pg_stat_subscription_stats| SELECT ss.subid,
|
||||
ss.confl_multiple_unique_conflicts,
|
||||
ss.stats_reset
|
||||
FROM pg_subscription s,
|
||||
LATERAL pg_stat_get_subscription_stats(s.oid) ss(subid, apply_error_count, seq_sync_error_count, sync_error_count, confl_insert_exists, confl_update_origin_differs, confl_update_exists, confl_update_deleted, confl_update_missing, confl_delete_origin_differs, confl_delete_missing, confl_multiple_unique_conflicts, stats_reset);
|
||||
LATERAL pg_stat_get_subscription_stats(s.oid) ss(subid, apply_error_count, sync_seq_error_count, sync_table_error_count, confl_insert_exists, confl_update_origin_differs, confl_update_exists, confl_update_deleted, confl_update_missing, confl_delete_origin_differs, confl_delete_missing, confl_multiple_unique_conflicts, stats_reset);
|
||||
pg_stat_sys_indexes| SELECT relid,
|
||||
indexrelid,
|
||||
schemaname,
|
||||
|
||||
@@ -79,7 +79,7 @@ sub create_sub_pub_w_errors
|
||||
$db,
|
||||
qq[
|
||||
SELECT count(1) = 1 FROM pg_stat_subscription_stats
|
||||
WHERE subname = '$sub_name' AND seq_sync_error_count > 0 AND sync_error_count > 0
|
||||
WHERE subname = '$sub_name' AND sync_seq_error_count > 0 AND sync_table_error_count > 0
|
||||
])
|
||||
or die
|
||||
qq(Timed out while waiting for sequencesync errors and tablesync errors for subscription '$sub_name');
|
||||
@@ -175,8 +175,8 @@ my ($pub1_name, $sub1_name) =
|
||||
is( $node_subscriber->safe_psql(
|
||||
$db,
|
||||
qq(SELECT apply_error_count > 0,
|
||||
seq_sync_error_count > 0,
|
||||
sync_error_count > 0,
|
||||
sync_seq_error_count > 0,
|
||||
sync_table_error_count > 0,
|
||||
confl_insert_exists > 0,
|
||||
confl_delete_missing > 0,
|
||||
stats_reset IS NULL
|
||||
@@ -197,8 +197,8 @@ $node_subscriber->safe_psql($db,
|
||||
is( $node_subscriber->safe_psql(
|
||||
$db,
|
||||
qq(SELECT apply_error_count = 0,
|
||||
seq_sync_error_count = 0,
|
||||
sync_error_count = 0,
|
||||
sync_seq_error_count = 0,
|
||||
sync_table_error_count = 0,
|
||||
confl_insert_exists = 0,
|
||||
confl_delete_missing = 0,
|
||||
stats_reset IS NOT NULL
|
||||
@@ -242,8 +242,8 @@ my ($pub2_name, $sub2_name) =
|
||||
is( $node_subscriber->safe_psql(
|
||||
$db,
|
||||
qq(SELECT apply_error_count > 0,
|
||||
seq_sync_error_count > 0,
|
||||
sync_error_count > 0,
|
||||
sync_seq_error_count > 0,
|
||||
sync_table_error_count > 0,
|
||||
confl_insert_exists > 0,
|
||||
confl_delete_missing > 0,
|
||||
stats_reset IS NULL
|
||||
@@ -263,8 +263,8 @@ $node_subscriber->safe_psql($db,
|
||||
is( $node_subscriber->safe_psql(
|
||||
$db,
|
||||
qq(SELECT apply_error_count = 0,
|
||||
seq_sync_error_count = 0,
|
||||
sync_error_count = 0,
|
||||
sync_seq_error_count = 0,
|
||||
sync_table_error_count = 0,
|
||||
confl_insert_exists = 0,
|
||||
confl_delete_missing = 0,
|
||||
stats_reset IS NOT NULL
|
||||
@@ -278,8 +278,8 @@ is( $node_subscriber->safe_psql(
|
||||
is( $node_subscriber->safe_psql(
|
||||
$db,
|
||||
qq(SELECT apply_error_count = 0,
|
||||
seq_sync_error_count = 0,
|
||||
sync_error_count = 0,
|
||||
sync_seq_error_count = 0,
|
||||
sync_table_error_count = 0,
|
||||
confl_insert_exists = 0,
|
||||
confl_delete_missing = 0,
|
||||
stats_reset IS NOT NULL
|
||||
|
||||
Reference in New Issue
Block a user