Must do pg_stat_clear_snapshot() inside test's loop, or our snapshot of
pg_stat_activity will never change :-(. Thinko in
b3427dade -- evidently
my workstation never really iterated the loop in testing. Per buildfarm.
begin
while (select count(*) from pg_stat_activity where pid = '
:'oldpid'
- ') > 0 loop c := c + 1; end loop;
+ ') > 0 loop c := c + 1; perform pg_stat_clear_snapshot(); end loop;
raise log ''test_extensions looped % times'', c;
end';
-- extension should now contain no temp objects
begin
while (select count(*) from pg_stat_activity where pid = '
:'oldpid'
- ') > 0 loop c := c + 1; end loop;
+ ') > 0 loop c := c + 1; perform pg_stat_clear_snapshot(); end loop;
raise log ''test_extensions looped % times'', c;
end';