aboutsummaryrefslogtreecommitdiff
path: root/contrib/test_decoding
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/test_decoding')
-rw-r--r--contrib/test_decoding/expected/stats.out14
-rw-r--r--contrib/test_decoding/sql/stats.sql8
2 files changed, 11 insertions, 11 deletions
diff --git a/contrib/test_decoding/expected/stats.out b/contrib/test_decoding/expected/stats.out
index bfffd1ac21d..dafca965201 100644
--- a/contrib/test_decoding/expected/stats.out
+++ b/contrib/test_decoding/expected/stats.out
@@ -21,7 +21,7 @@ BEGIN
ELSE (spill_txns > 0)
END
INTO updated
- FROM pg_stat_replication_slots WHERE name='regression_slot';
+ FROM pg_stat_replication_slots WHERE slot_name='regression_slot';
exit WHEN updated;
@@ -57,8 +57,8 @@ SELECT wait_for_decode_stats(false);
(1 row)
-SELECT name, spill_txns > 0 AS spill_txns, spill_count > 0 AS spill_count FROM pg_stat_replication_slots;
- name | spill_txns | spill_count
+SELECT slot_name, spill_txns > 0 AS spill_txns, spill_count > 0 AS spill_count FROM pg_stat_replication_slots;
+ slot_name | spill_txns | spill_count
-----------------+------------+-------------
regression_slot | t | t
(1 row)
@@ -76,8 +76,8 @@ SELECT wait_for_decode_stats(true);
(1 row)
-SELECT name, spill_txns, spill_count FROM pg_stat_replication_slots;
- name | spill_txns | spill_count
+SELECT slot_name, spill_txns, spill_count FROM pg_stat_replication_slots;
+ slot_name | spill_txns | spill_count
-----------------+------------+-------------
regression_slot | 0 | 0
(1 row)
@@ -95,8 +95,8 @@ SELECT wait_for_decode_stats(false);
(1 row)
-SELECT name, spill_txns > 0 AS spill_txns, spill_count > 0 AS spill_count FROM pg_stat_replication_slots;
- name | spill_txns | spill_count
+SELECT slot_name, spill_txns > 0 AS spill_txns, spill_count > 0 AS spill_count FROM pg_stat_replication_slots;
+ slot_name | spill_txns | spill_count
-----------------+------------+-------------
regression_slot | t | t
(1 row)
diff --git a/contrib/test_decoding/sql/stats.sql b/contrib/test_decoding/sql/stats.sql
index b95adb16fa7..182df84030d 100644
--- a/contrib/test_decoding/sql/stats.sql
+++ b/contrib/test_decoding/sql/stats.sql
@@ -19,7 +19,7 @@ BEGIN
ELSE (spill_txns > 0)
END
INTO updated
- FROM pg_stat_replication_slots WHERE name='regression_slot';
+ FROM pg_stat_replication_slots WHERE slot_name='regression_slot';
exit WHEN updated;
@@ -47,17 +47,17 @@ SELECT count(*) FROM pg_logical_slot_peek_changes('regression_slot', NULL, NULL,
-- exact stats count as that can vary if any background transaction (say by
-- autovacuum) happens in parallel to the main transaction.
SELECT wait_for_decode_stats(false);
-SELECT name, spill_txns > 0 AS spill_txns, spill_count > 0 AS spill_count FROM pg_stat_replication_slots;
+SELECT slot_name, spill_txns > 0 AS spill_txns, spill_count > 0 AS spill_count FROM pg_stat_replication_slots;
-- reset the slot stats, and wait for stats collector to reset
SELECT pg_stat_reset_replication_slot('regression_slot');
SELECT wait_for_decode_stats(true);
-SELECT name, spill_txns, spill_count FROM pg_stat_replication_slots;
+SELECT slot_name, spill_txns, spill_count FROM pg_stat_replication_slots;
-- decode and check stats again.
SELECT count(*) FROM pg_logical_slot_peek_changes('regression_slot', NULL, NULL, 'skip-empty-xacts', '1');
SELECT wait_for_decode_stats(false);
-SELECT name, spill_txns > 0 AS spill_txns, spill_count > 0 AS spill_count FROM pg_stat_replication_slots;
+SELECT slot_name, spill_txns > 0 AS spill_txns, spill_count > 0 AS spill_count FROM pg_stat_replication_slots;
DROP FUNCTION wait_for_decode_stats(bool);
DROP TABLE stats_test;