Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XEFG5-0003Qd-VX for pgsql-performance@arkaria.postgresql.org; Mon, 04 Aug 2014 10:12:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XEFG5-00082j-6W for pgsql-performance@arkaria.postgresql.org; Mon, 04 Aug 2014 10:12:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XEFG3-00082a-3y for pgsql-performance@postgresql.org; Mon, 04 Aug 2014 10:12:47 +0000 Received: from mail-pd0-x236.google.com ([2607:f8b0:400e:c02::236]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1XEFFx-0000Ou-VH for pgsql-performance@postgresql.org; Mon, 04 Aug 2014 10:12:45 +0000 Received: by mail-pd0-f182.google.com with SMTP id fp1so9464994pdb.27 for ; Mon, 04 Aug 2014 03:12:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:message-id:date:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=uxxVVJnvj00dJEK6QodJ6/bwLcRFyb6Omg+zQrbBsNQ=; b=ABSWHRn/CReIUY6N9um62lCgni4orxzBtxKfxGLm2WrdEk4xTj4bhxl8Hf8LuVE99J 6sUB2vR7o6ljHdoJ85fpKujYud2VpWMuGc7M1UejfgNwOfDMN4DNAiaWjiyp2tJvrX6Y hmTyZmnqeGBbyEuTgy+kpR1b1NVG9sOKo1+nMJlwrr78KT+Y+2WhdxjWcgm7o11rX3WY erXsEblTJNsQs+9krvpweyPSlPE+mlc3mngnePtzyEgA0V3tuqU6NE8NdHDl61Py5MGD /Sj7BIuHsIirngp+LvkyB2SKjFnpb8/kYaHYwOFBs/DLVI4AcEZqWda/ywP0HxFAjPCR Xe1Q== X-Received: by 10.70.92.49 with SMTP id cj17mr22996815pdb.53.1407147158255; Mon, 04 Aug 2014 03:12:38 -0700 (PDT) Received: from [192.168.2.103] ([116.226.54.112]) by mx.google.com with ESMTPSA id ra2sm11862847pbc.71.2014.08.04.03.12.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Aug 2014 03:12:37 -0700 (PDT) From: Rural Hunter X-Google-Original-From: Rural Hunter Message-ID: <53DF5C93.6010007@gmail.com> Date: Mon, 04 Aug 2014 18:12:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: "pgsql-performance@postgresql.org" Subject: Re: Very slow planning performance on partition table References: <53CFB6BC.4050606@gmail.com> <25010.1406253203@sss.pgh.pa.us> <53D26875.2080604@gmail.com> <53D51E49.102@gmail.com> <24564.1406478487@sss.pgh.pa.us> <53D7597E.2080209@gmail.com> <53D8C2F2.3080105@gmail.com> In-Reply-To: <53D8C2F2.3080105@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org 在 2014/7/30 18:03, Rural Hunter 写道: > I think I understand what happened now. I have another monitor script > runs periodically and calls pg_cancel_backend and pg_terminate_backend > for those hanging update sqls. However for some unkown reason the > cancle and termiante command doesn't work at pgsql side for those > update sqls. > With the log of the monitor&kill scipt, I can confirm that the CLOSE_WAIT is not caused by it. I logged the netstat before actually doing the kill and found the CLOSE_WAIT connections were already there. So it must be something else caused the CLOSE_WAIT connections. -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance