Skip to content
Snippets Groups Projects
Commit afd0fcbc authored by Heikki Linnakangas's avatar Heikki Linnakangas
Browse files

Fix test_decoding test case's check that slot has been dropped.

pg_stat_replication shows connected replication clients. The ddl test case
never has any replication clients connected, so querying pg_stat_replication
is pointless. To check that a slot has been dropped correctly, query
pg_replication_slots instead.

Andres Freund
parent 03e2b101
Branches
Tags
No related merge requests found
......@@ -639,9 +639,9 @@ SELECT pg_drop_replication_slot('regression_slot');
(1 row)
/* check that we aren't visible anymore now */
SELECT * FROM pg_stat_replication;
pid | usesysid | usename | application_name | client_addr | client_hostname | client_port | backend_start | backend_xmin | state | sent_location | write_location | flush_location | replay_location | sync_priority | sync_state
-----+----------+---------+------------------+-------------+-----------------+-------------+---------------+--------------+-------+---------------+----------------+----------------+-----------------+---------------+------------
/* check that the slot is gone */
SELECT * FROM pg_replication_slots;
slot_name | plugin | slot_type | datoid | database | active | xmin | catalog_xmin | restart_lsn
-----------+--------+-----------+--------+----------+--------+------+--------------+-------------
(0 rows)
......@@ -331,7 +331,8 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
-- done, free logical replication slot
SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'include-xids', '0');
SELECT pg_drop_replication_slot('regression_slot');
/* check that we aren't visible anymore now */
SELECT * FROM pg_stat_replication;
/* check that the slot is gone */
SELECT * FROM pg_replication_slots;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment