Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hr1DY-0000wq-V2 for pgsql-general@arkaria.postgresql.org; Fri, 26 Jul 2019 14:29:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hr1DX-0005O7-Kf for pgsql-general@arkaria.postgresql.org; Fri, 26 Jul 2019 14:29:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hr1DV-0005O0-UQ for pgsql-general@lists.postgresql.org; Fri, 26 Jul 2019 14:29:07 +0000 Received: from [64.147.123.24] (helo=wout1-smtp.messagingengine.com) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hr1DQ-0006eG-TU for pgsql-general@postgresql.org; Fri, 26 Jul 2019 14:29:05 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 2011960D; Fri, 26 Jul 2019 10:28:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 26 Jul 2019 10:28:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=f rHOF0a0AELktIaoStRvasKnFLWY4bfT7btiW64lfCw=; b=Db2NurV5r3OgOG61I 6+/8f38no2fPFQgjBaTHXtGN1XnQK1hr49S0AenK1HGNbA2RvRDY4A3TUM8Ec6/N VIY4/Z3E98MPdnR7X5vlPK6A1FAZben7XU228DUbvlwdG1l6D13ZffKq8iQrYgBL 5OzYtB8PI08F2NtquLiX0MAs75x6sV87UfVhhq6yMiXtQe8t1IBiTskXx8qUMKxU WGX0tbsjQt5j8SDPR+1+E7VwcDrF2wPrfKchc1wBGQn07GqXh9cZ+pwl5ZgOJF3R eZ4vFOjexlsGwlogWvJNDmptylOS5UuQnxEniGc1nx0TqrhzIW581gc1N9TKn9+f sxZ/w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=frHOF0a0AELktIaoStRvasKnFLWY4bfT7btiW64lf Cw=; b=fBAQFfy73PgkPKc3QKyMUcvSZjl9VbPbjOlE5uhjsvBLt7GxiEmEMDrLS yvDjcalyjjSwVauHjz1PG1G3HIxdY76LS5S3YAoE9RKNHGoyK5Be0NeACQ5I08lB JIwv8y1dCQuHxJXWaSXp/SPzj/RAFGMUeiOMAKhE4s74bAKXpXOqsWvyrmyUeHLX BnP/IHhreHEZy/v9QjQQYFYk0FR1ckJBmE0EEUao0atUBNJgiXTW0wPREFp0+A3L wNNZtLPW6pIqFHwfqRa3j9TYvpQDU2HatR9Mso+swP1hQu72PGtA5LBUP/XgKrwt Qf7rUoV7QvaqWei/k3DO/uwKTQuBw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrkeeggdejjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthejre dttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucffohhmrghinhepphhoshhtghhrvghsqh hlqdgrrhgthhhivhgvrdhorhhgpdhpohhsthhgrhgvshhqlhdrohhrghenucfkphepjedu rddvuddvrdduhedtrddvtddvnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnh drkhhlrghvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id CDE648005C; Fri, 26 Jul 2019 10:28:36 -0400 (EDT) Subject: Re: Too slow to create new schema and their tables, functions, triggers. To: PegoraroF10 , pgsql-general@postgresql.org References: <1563909633976-0.post@n3.nabble.com> <1563993228524-0.post@n3.nabble.com> <18481dfb-af39-b6a2-7b27-88563cab7134@aklaver.com> <1564092985717-0.post@n3.nabble.com> <47c2bef2-a283-7849-2545-c1cb0dd5140e@aklaver.com> <1564095689955-0.post@n3.nabble.com> <479a75d1-938f-0243-517a-3db26799fb07@aklaver.com> <1564139731131-0.post@n3.nabble.com> From: Adrian Klaver Message-ID: <5d1d5304-d64f-8079-1e7e-167f7cf0e662@aklaver.com> Date: Fri, 26 Jul 2019 07:28:36 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <1564139731131-0.post@n3.nabble.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.24 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 7/26/19 4:15 AM, PegoraroF10 wrote: > select count(*), count(*) filter (where last_autovacuum is not null) from > pg_stat_all_tables > count count > 36605 1178 > > But what tables should I see if vacuum ran on it ? I would recommend reading this: https://www.postgresql.org/docs/11/routine-vacuuming.html and in particular: https://www.postgresql.org/docs/11/routine-vacuuming.html#AUTOVACUUM For now look at the actual values of last_autovacuum to see how current the autovacuuming is. My guess is that the issues you are having has to do with bloat in the system tables, so I would start there. > > > > -- > Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html > > > -- Adrian Klaver adrian.klaver@aklaver.com