Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eliAX-00083O-Iz for pgsql-bugs@arkaria.postgresql.org; Tue, 13 Feb 2018 21:31:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eliAW-0002UJ-OA for pgsql-bugs@arkaria.postgresql.org; Tue, 13 Feb 2018 21:31:16 +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_2) (envelope-from ) id 1eliAW-0002Tt-AV for pgsql-bugs@lists.postgresql.org; Tue, 13 Feb 2018 21:31:16 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eliAT-000695-AQ for pgsql-bugs@postgresql.org; Tue, 13 Feb 2018 21:31:15 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 6E25521454; Tue, 13 Feb 2018 16:31:12 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Tue, 13 Feb 2018 16:31:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=ojLLQzHYhkH/GIKqVHTxHWV5yvZ0W XNy/UuIx6YJkcE=; b=BX3VdiNFj+sLUw0RFL3WiV0GLAtFrJC1R2qBn1Bvt3NUu g3OdaHMBgcyK3qYF+8/0pSft6e8qpvaoXJk2qEDegvC4lg6+Afa367HCEzC3JIW3 B8AS1Y/Tej8Eg7upnJD5Q+BzMdks48HMb/VWM9EvARvKqKC56p3AyU98QcrtTpiH 6F1emUzhEZLAX+giMhejr2qlVbsaxVkdH826pFkd+clDkpmVtQ+FxT+j/z8JyLB4 MLS4v0tDQZvpPlYn2lEN9hcBPpnxFcsI9HqOT1uJw/1SwBLNQ/JOE52DWQQVLrGk 7mjc3z7Fnm9mPzVceHWhAuCwjki6/vqcN7799pY3A== X-ME-Sender: Received: from intern.anarazel.de (unknown [136.24.76.189]) by mail.messagingengine.com (Postfix) with ESMTPA id A69E9246D5; Tue, 13 Feb 2018 16:31:11 -0500 (EST) Date: Tue, 13 Feb 2018 13:31:10 -0800 From: Andres Freund To: David Gould Cc: Tom Lane , =?utf-8?B?55+z5YuH6JmO?= , pgsql-bugs@postgresql.org Subject: Re: response time is very long in PG9.5.5 using psql or jdbc Message-ID: <20180213213110.5ip4hsnu2hjz52ae@alap3.anarazel.de> References: <72aa8c39225549dd8c1d18f96df8b1e3@pingan.com.cn> <30153.1518488973@sss.pgh.pa.us> <30157.1518548280@sss.pgh.pa.us> <20180213132447.0a26f00c@engels> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180213132447.0a26f00c@engels> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2018-02-13 13:24:47 -0800, David Gould wrote: > I see this problem fairly frequently. Typically the problem catalog is > pg_attribute as it has the most rows. However the problem really arises when > the catalogs become bloated. Once the total size of the catalogs that get > read at start up approaches the size of shared buffers, and especially if > several processes start at the same time, it becomes quite noticeable. I can obviously see problems with a bloated catalog, but how does that cause massive slowdowns in *individual* queries as we see here? The OP's problem isn't the connection establishment performance afaict, but the first query using specific pieces of catalog data. And that should be ok-ish performancewise, even if there's bloat. Greetings, Andres Freund