diff options
Diffstat (limited to 'contrib/postgres_fdw/sql')
-rw-r--r-- | contrib/postgres_fdw/sql/query_cancel.sql | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/postgres_fdw/sql/query_cancel.sql b/contrib/postgres_fdw/sql/query_cancel.sql index 270e129d77e..a6830705843 100644 --- a/contrib/postgres_fdw/sql/query_cancel.sql +++ b/contrib/postgres_fdw/sql/query_cancel.sql @@ -13,8 +13,10 @@ SELECT count(*) FROM ft1 a CROSS JOIN ft1 b CROSS JOIN ft1 c CROSS JOIN ft1 d; BEGIN; -- Make sure that connection is open and set up. SELECT count(*) FROM ft1 a; --- Timeout needs to be long enough to be sure that we've sent the slow query. -SET LOCAL statement_timeout = '100ms'; +-- On most machines, 10ms will be enough to be sure that we've sent the slow +-- query. We may sometimes exercise the race condition where we send cancel +-- before the remote side starts the query, but that's fine too. +SET LOCAL statement_timeout = '10ms'; -- This would take very long if not canceled: SELECT count(*) FROM ft1 a CROSS JOIN ft1 b CROSS JOIN ft1 c CROSS JOIN ft1 d; COMMIT; |