Fix race condition in test_decoding "slot" test.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 12 Dec 2016 19:32:09 +0000 (14:32 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 12 Dec 2016 19:32:13 +0000 (14:32 -0500)
commit23f722ba8e19ca1a7c2ada9d6e687989b6e8f4d1
tree0bc264c554a7ea897d3c4e3897f4b8ed683013ef
parentb4630e01fd4c73c195025b7307ebc13d489b9ef9
Fix race condition in test_decoding "slot" test.

This test, just added in commit a924c327e, sometimes fails because
the old backend hasn't finished dropping the temporary replication slot
when the new backend looks.  Borrow the previously-invented methodology
for waiting for the old process to disappear from pg_stat_activity.

Petr Jelinek

Discussion: https://postgr.es/m/62935e6f-4f1b-c433-e0fa-7f936a38b3e5@2ndquadrant.com
contrib/test_decoding/expected/slot.out
contrib/test_decoding/sql/slot.sql