Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WONVD-0002yE-E2 for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Mar 2014 08:30:03 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WONVC-00056Z-H8 for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Mar 2014 08:30:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WONVB-00056Q-CO for pgsql-bugs@postgresql.org; Fri, 14 Mar 2014 08:30:01 +0000 Received: from mail-ee0-x229.google.com ([2a00:1450:4013:c00::229]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WONV8-00057W-9L for pgsql-bugs@postgresql.org; Fri, 14 Mar 2014 08:30:01 +0000 Received: by mail-ee0-f41.google.com with SMTP id t10so1068915eei.0 for ; Fri, 14 Mar 2014 01:29:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-transfer-encoding:content-type; bh=CvURm7MbTWvWitIG/0WvdsN8cTQIBtXyQ2t8o50HcUs=; b=ZUkPgsIqX5mt0RdR1ENdXP50OnYe+nMFgsi9OlE88BxKjZYnBj6808GbwJDEcOfsyA QXrG0G6jrkaD7WlS+L425AkJ5+T1hJl14BwLJZC6Sx/TvN/fQHZt5t3coD0u/lN1gRnQ I5vZdW3iSu6Bgj9SV1oV3VdYG8P2JeA+RTjUIyP/ZUszeuOrxzskw9Kl26rTIlIca/xv zEaspNLF7knEFyLi3AOBw9MajbqbepuLkOlGCA9e2XeJCgzYKNqJAl5CG7yKW9NzDfvE NgmXehByE2fAjTz6OgKqE6vL7u9b98Hw8JYig4dQiOh5fvNRvq4pi/cM3ljFPI6KRIjj lyeg== X-Received: by 10.14.182.131 with SMTP id o3mr6805152eem.67.1394785796708; Fri, 14 Mar 2014 01:29:56 -0700 (PDT) Received: from shu.localnet ([89.38.174.207]) by mx.google.com with ESMTPSA id m42sm15526456eex.21.2014.03.14.01.29.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Mar 2014 01:29:55 -0700 (PDT) From: Robert Voinea To: pgsql-bugs@postgresql.org Subject: BUG #5465: dblink TCP connection hangs blocking translation from being terminated Date: Fri, 14 Mar 2014 10:30:11 +0200 Message-ID: <10183969.312fJvI1H2@shu> User-Agent: KMail/4.11.1 (Linux/3.10.12-031012-generic; KDE/4.11.1; i686; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="utf-8" X-Pg-Spam-Score: -0.9 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hi In our setup, we make use extensively of dblink. Due to the fact that some queries take some time to complete and that the link is over the internet, sometime the server process (the transaction that runs the dblink queries) hangs when the link goes down, keeping locks on several records plus some advisory locks and thus freezing the whole (most of) the database. What I have found is this bug, that is remarkably similar (if not identical) with what we are experiencing. http://postgresql.1045698.n5.nabble.com/BUG-5465-dblink-TCP-connection-hangs-blocking-translation-from-being-terminated-td2132419.html#a2132420 The bug dates from may 2010 and no update since. One of the comments states that there is work done for version 9.0 ...but I haven't seen anything in the changelog related to this in any version starting with the one we are using (9.1.12). I believe this is a known issue in dblink, where it's not possible to cancel it when it's waiting in the TCP layer in the kernel. Unfortunately, there is no fix ATM - there was some work towards it for 9.0 at one point, but I think this is actually the first real bug-report on the issue... Has there been any progress in this direction? Thank you! -- Robert Voinea Software Engineer +4 0740 467 262 Don't take life too seriously. You'll never get out of it alive. (Elbert Hubbard) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs