Andres Freund <and...@anarazel.de> writes: > Not that I understand why that tries to terminate connections, instead of just > looking at application name.
The test is trying to verify the application name reported by the "remote" session, which isn't constant, so we can't just do "select application_name from pg_stat_activity". I agree that terminating the connection seems like kind of a strange thing to do --- maybe it's to ensure that we get a new session with the updated application name for the next test case? If not, maybe we could do "select 1 from pg_stat_activity where application_name = computed-pattern", but that has the same problem that a cache flush might have terminated the remote session. regards, tom lane