Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.utanet.at!newscore.univie.ac.at!aconews-feed.univie.ac.at!aconews.univie.ac.at!not-for-mail From: "Laurenz Albe" Newsgroups: comp.databases.postgresql References: <1319536517.567090@proxy.dienste.wien.at> Subject: Re: Windows: when the Session deleted/resources released? Date: Thu, 27 Oct 2011 10:12:41 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Organization: MagistratWien newsserver Message-Id: <1319703181.997995@proxy.dienste.wien.at> X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) Lines: 43 NNTP-Posting-Host: 141.203.254.23 X-Trace: 1319703185 aconews.univie.ac.at 11354 141.203.254.23 X-Complaints-To: abuse@univie.ac.at Xref: x330-a1.tempe.blueboxinc.net comp.databases.postgresql:268 durumdara wrote: >>> So today I started and experience with two PC (Win7 server, WXP >>> client). >>> PG9, PGAdmin v14. >>> The statement timeout is 5 minute, the tcp_keepalive is default. >> [but aborted connections don't get closed on the server] >> >> statement_timeout does not come into play here. >> >> Could you post the result of >> >> SELECT current_setting('tcp_keepalives_idle'), >> current_setting('tcp_keepalives_interval'), >> current_setting('tcp_keepalives_count'); > PGADMIN shown: > -1, -1, 0 > > But: after (I started the XP client) 2 hours passed, and the sessions > starting to vanish one by one. > So may the timeout is "2 hours" now in the system (Win7/x64). > So: what I can do to set this value lower? > Is it enough to parameterize the registry on the server? > > Why the PGSQL isn't supports a value that set timeout, when the server > "abort" the tcp connection on session? > > This can override the default tcp parameters. Probably I'm misunderstanding something crucial here, but why don't you set tcp_keepalives_idle=600 or something similar if two hours is too long for you? These parameters are there specifically so that you can change the settings for PostgreSQL without changing the operating system's TCP settings. Yours, Laurenz Albe