Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitafd0fcb

Browse files
committed
Fix test_decoding test case's check that slot has been dropped.
pg_stat_replication shows connected replication clients. The ddl test casenever has any replication clients connected, so querying pg_stat_replicationis pointless. To check that a slot has been dropped correctly, querypg_replication_slots instead.Andres Freund
1 parent03e2b10 commitafd0fcb

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

‎contrib/test_decoding/expected/ddl.out

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -639,9 +639,9 @@ SELECT pg_drop_replication_slot('regression_slot');
639639

640640
(1 row)
641641

642-
/* check thatwe aren't visible anymore now */
643-
SELECT * FROMpg_stat_replication;
644-
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
645-
-----+----------+---------+------------------+-------------+-----------------+-------------+---------------+--------------+-------+---------------+----------------+----------------+-----------------+---------------+------------
642+
/* check thatthe slot is gone */
643+
SELECT * FROMpg_replication_slots;
644+
slot_name |plugin |slot_type |datoid |database |active |xmin |catalog_xmin |restart_lsn
645+
-----------+--------+-----------+--------+----------+--------+------+--------------+-------------
646646
(0 rows)
647647

‎contrib/test_decoding/sql/ddl.sql

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,8 @@ SELECT data FROM pg_logical_slot_get_changes('regression_slot', NULL, NULL, 'inc
331331

332332
-- done, free logical replication slot
333333
SELECT dataFROM pg_logical_slot_get_changes('regression_slot',NULL,NULL,'include-xids','0');
334+
334335
SELECT pg_drop_replication_slot('regression_slot');
335336

336-
/* check thatwe aren't visible anymore now*/
337-
SELECT*FROMpg_stat_replication;
337+
/* check thatthe slot is gone*/
338+
SELECT*FROMpg_replication_slots;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp