mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Change the attribute name in pg_stat_replication_slots view.
Change the attribute 'name' to 'slot_name' in pg_stat_replication_slots view to make it clear and that way we will be consistent with the other places like pg_stat_wal_receiver view where we display the same attribute. In the passing, fix the typo in one of the macros in the related code. Bump the catversion as we have modified the name in the catalog as well. Reported-by: Noriyoshi Shinoda Author: Noriyoshi Shinoda Reviewed-by: Sawada Masahiko and Amit Kapila Discussion: https://postgr.es/m/CA+fd4k5_pPAYRTDrO2PbtTOe0eHQpBvuqmCr8ic39uTNmR49Eg@mail.gmail.com
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user