Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1aB0cN-0006f2-15 for pgsql-odbc@arkaria.postgresql.org; Mon, 21 Dec 2015 13:35:15 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1aB0cM-00029R-Gc for pgsql-odbc@arkaria.postgresql.org; Mon, 21 Dec 2015 13:35:14 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1aB0by-0000oP-Kc for pgsql-odbc@postgresql.org; Mon, 21 Dec 2015 13:34:50 +0000 Received: from mail-pf0-x235.google.com ([2607:f8b0:400e:c00::235]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1aB0bv-0007Zk-El for pgsql-odbc@postgresql.org; Mon, 21 Dec 2015 13:34:49 +0000 Received: by mail-pf0-x235.google.com with SMTP id o64so89001703pfb.3 for ; Mon, 21 Dec 2015 05:34:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=Pe8bQc5vU8bBTLh8IQuvUBVXszUUfsaumGzIBpfMFmo=; b=F/t1vMu/fhDyDl49eV431BXPypGl/jFVnS7+GwcCB6zqatqvIbgwwnL+8KryVrqCta rFm0hk0LcYsEFvqcskPty5elzlUUnxO3ytzVAft2pn0k9dO5Ra339tEGrNPoE1YVCQId hpJi08LN+V5QxFGc91r7hY41buuEt3/fYhHqUtz/yx0MUvbhQ/c7lLo5w1RDLvYy0Br1 u6qyh/MLWIupHFMiLnOmIP7FfvaiWouAkccg73yG2jMk+a02hyfid2K7JJ+FuBe8cYU8 OlJ5HWFx2EaesVuLJStLJrYZfDqcvTxdtg3MwCnNtQWfY5e9Vf0o6yKFG5uHFkdsZjrY PzGA== X-Received: by 10.98.80.144 with SMTP id g16mr26983261pfj.68.1450704886332; Mon, 21 Dec 2015 05:34:46 -0800 (PST) Received: from [192.168.1.115] (dsl-hkibrasgw1-58c38f-82.dhcp.inet.fi. [88.195.143.82]) by smtp.gmail.com with ESMTPSA id h19sm34957755pfj.23.2015.12.21.05.34.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Dec 2015 05:34:45 -0800 (PST) Subject: Re: query timeout To: Ondrej Dzivy Balucha , pgsql-odbc@postgresql.org References: <5677FE48.8010100@horizon.sk> From: Heikki Linnakangas Message-ID: <5677FFD5.1080703@iki.fi> Date: Mon, 21 Dec 2015 15:34:13 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.4.0 MIME-Version: 1.0 In-Reply-To: <5677FE48.8010100@horizon.sk> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.3 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org On 21/12/15 15:27, Ondrej Dzivy Balucha wrote: > Hi > > Is there any keyword to setup query timeout? I have ODBC connection to > remote PostgreSQL database. > I connect to db with isql (for example), send query and i get result. > Now connection lost(disconnected cable or other problem) and I send next > query. No answer or error message and isql waiting and waiting and .... > waiting(I was waiting for 20 minutes and no response). Is there any way > to setup timeout in odbc.ini or odbcinst.ini? > > I know that ibm DB2 has this keyword in db2 client(ReceiveTimeout = time > in seconds to wait for a reply from the server on an established > connection before terminating the attempt and generating a communication > timeout error). If I setup ReceiveTimeout = 5 , than I get error after 5 > seconds when no response. > I need setup this for PostgreSQL. There are KeepaliveTime and KeepaliveInterval, which set the TCP keepalive settings. TCP timeouts tends to be very long, though, in the order of minutes or hours rather than seconds. - Heikki -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc