Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 145451C43869 for ; Thu, 9 Aug 2012 23:25:06 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SzeuN-00086Z-9z for pgsql-admin@postgresql.org; Fri, 10 Aug 2012 02:25:05 +0000 Received: by pbbrr13 with SMTP id rr13so1895717pbb.19 for ; Thu, 09 Aug 2012 19:24:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=NqU8PtPQRSXWXAQXYPnLjPzNrQrskK4v5XEh2q7AV7I=; b=keM+4T08So1S5pLabengpo6ITWhrBVnM9pcuf3+HC16k4deoYT/rPt4VMmnF1qqLIE xDaFxvePh1sprPuotfGzHi+K9eBM9k3QCjtmAAxN9MaQniptyUSZRvWdTHNnTMv1rzMo WDMLydD8aeVn8Q9LQnGFfUXde1jAklLWiexrZwYsZnPGmPl+NoQHDFA7MzIu9BT3XALZ UX8aKgzHmPPBAezU5H/mBydhCeYMecFZHUUHP+z83XSHa3GK612D8WPIFBd7yl7xpYsR f73HnuyMvf0ZPqmlHIujpyoFg3lo0t4WWV6clLYeqNEbORKXr6G0yklF1HXZtJbMGCZl JOJQ== Received: by 10.68.221.1 with SMTP id qa1mr8680394pbc.7.1344565486208; Thu, 09 Aug 2012 19:24:46 -0700 (PDT) Received: from ayaki.localdomain (124-169-173-54.dyn.iinet.net.au. [124.169.173.54]) by mx.google.com with ESMTPS id or1sm2300826pbb.10.2012.08.09.19.24.43 (version=SSLv3 cipher=OTHER); Thu, 09 Aug 2012 19:24:45 -0700 (PDT) Message-ID: <502470E8.4010807@ringerc.id.au> Date: Fri, 10 Aug 2012 10:24:40 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Tom Lane CC: Greg Williamson , "pgsql-admin@postgresql.org" Subject: Re: Question about ALTER TABLE DROP CONSTRAINT on 9.1 -- psql crashes References: <1344557082.43876.YahooMailNeo@web125906.mail.ne1.yahoo.com> <8579.1344557984@sss.pgh.pa.us> <1344558910.70207.YahooMailNeo@web125906.mail.ne1.yahoo.com> <1344562260.90632.YahooMailNeo@web125901.mail.ne1.yahoo.com> <10482.1344564417@sss.pgh.pa.us> In-Reply-To: <10482.1344564417@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQneGWvRMgaSAGwQrhaRLiVxw6AwFejmdsBhj5/IWKcRydLYqEs3nu3BYumAhgE3mubhNd5d X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201208/72 X-Sequence-Number: 39893 On 08/10/2012 10:06 AM, Tom Lane wrote: > Greg Williamson writes: >> Every minute on the minute there is a cronjob that kills IDLE IN CONNECTION procs older than 3 seconds ... possibly that process killed the process I was running, but to me the user it seemed as if the COMMIT came before the disconnect. > That sure sounds like the source of your problem. It might be sane if > it killed only processes that *had been idle* for at least three > seconds, but I'm not sure there is any easy way to determine that ... wouldn't: select * from pg_stat_activity where current_query = ' in transaction' AND query_start < current_timestamp - INTERVAL '3 seconds'; do it? -- Craig Ringer