From: | tushar <tushar(dot)ahuja(at)enterprisedb(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com>, Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com> |
Cc: | Suraj Kharage <suraj(dot)kharage(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: statement_timeout is not working as expected with postgres_fdw |
Date: | 2017-05-04 10:34:20 |
Message-ID: | 62c8c804-e082-8527-fda9-e850b1587042@enterprisedb.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 05/04/2017 03:53 PM, tushar wrote:
> We can see statement_timeout is working but it is taking some extra
> time,not sure this is an expected behavior in above case or not.
This is only when remote server is involved . in case when both the
servers are on the same machine , then this is working as expected.
d1=# CREATE SERVER myserver_ppas FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'localhost', dbname 'postgres', port '5432',
connect_timeout '3');
CREATE SERVER
d1=# CREATE USER MAPPING FOR centos SERVER myserver_ppas OPTIONS (user
'centos', password 'adminedb');
CREATE USER MAPPING
d1=# create foreign table ft_test_ppas (a int ) server myserver_ppas
options (table_name 'test1');
CREATE FOREIGN TABLE
d1=#
d1=# insert into ft_test_ppas values (1);
INSERT 0 1
Case 1-
d1=# \timing
Timing is on.
d1=# set statement_timeout =6000;
SET
Time: 0.360 ms
d1=# insert into ft_test_ppas values (generate_series(1,10000000));
ERROR: canceling statement due to statement timeout
Time: 6002.509 ms (00:06.003)
d1=#
Case 2 -
d1=# set statement_timeout =20000;
SET
Time: 0.693 ms
d1=# insert into ft_test_ppas values (generate_series(1,10000000));
ERROR: canceling statement due to statement timeout
Time: 20001.741 ms (00:20.002)
d1=#
--
regards,tushar
EnterpriseDB https://www.enterprisedb.com/
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2017-05-04 11:06:18 | Re: statement_timeout is not working as expected with postgres_fdw |
Previous Message | amul sul | 2017-05-04 10:32:32 | Re: Adding support for Default partition in partitioning |