diff options
author | Kevin Grittner | 2017-04-05 15:04:36 +0000 |
---|---|---|
committer | Kevin Grittner | 2017-04-05 15:04:36 +0000 |
commit | 4deb413813f619b3e859abf435b61efc09cafe09 (patch) | |
tree | e672df265309fe1f280f6d9563d6bd440960e52c /src/test/isolation/isolationtester.c | |
parent | e59b74a3fc524a658172d9ec9f1728da89136bce (diff) |
Add isolation test for SERIALIZABLE READ ONLY DEFERRABLE.
This improves code coverage and lays a foundation for testing
similar issues in a distributed environment.
Author: Thomas Munro <[email protected]>
Reviewed-by: Michael Paquier <[email protected]>
Diffstat (limited to 'src/test/isolation/isolationtester.c')
-rw-r--r-- | src/test/isolation/isolationtester.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/isolation/isolationtester.c b/src/test/isolation/isolationtester.c index f77f4657512..4d18710bdfd 100644 --- a/src/test/isolation/isolationtester.c +++ b/src/test/isolation/isolationtester.c @@ -231,6 +231,14 @@ main(int argc, char **argv) appendPQExpBuffer(&wait_query, ",%s", backend_pids[i]); appendPQExpBufferStr(&wait_query, "}'::integer[]"); + /* Also detect certain wait events. */ + appendPQExpBufferStr(&wait_query, + " OR EXISTS (" + " SELECT * " + " FROM pg_catalog.pg_stat_activity " + " WHERE pid = $1 " + " AND wait_event IN ('SafeSnapshot'))"); + res = PQprepare(conns[0], PREP_WAITING, wait_query.data, 0, NULL); if (PQresultStatus(res) != PGRES_COMMAND_OK) { |