Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uJvth-009dIm-Lj for pgsql-performance@arkaria.postgresql.org; Tue, 27 May 2025 15:07:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uJvtg-008oGE-4I for pgsql-performance@arkaria.postgresql.org; Tue, 27 May 2025 15:07:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uJvtf-008oG6-Ag for pgsql-performance@lists.postgresql.org; Tue, 27 May 2025 15:07:19 +0000 Received: from fout-a8-smtp.messagingengine.com ([103.168.172.151]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uJvtc-000DlH-2a for pgsql-performance@lists.postgresql.org; Tue, 27 May 2025 15:07:18 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 6012A1383ABA; Tue, 27 May 2025 11:07:15 -0400 (EDT) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Tue, 27 May 2025 11:07:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm2; t=1748358435; x= 1748444835; bh=gQgY0IbEIgTAL9f19fiYR1ce+UWeQPbA3pXwH9CA220=; b=V kNn4DdkWwMOCdSuIZg1fGCF04uOCI46t18Uzm/uayvPyAtnx6WQ+sJ47NMOS8jMy 70tSvdwQgiUsbRgZTIt8mwQg7cpblbrleyvtC93/WaD9HsFnwUtZsSvmXEb1dO0G CoCGkfOIxtSm6AfkR++IRXj7fzqYsGUFRPkHeMgAD3jFKA5+rvRGg1tXakSBkhU8 9kJ0shpZl6JZEHwRsrXunO2Gwa1G45pwQdZ3s4pqEzGaFGeKH9YKNijn6LH1ibAh 5295bCt1CBmAoZJ0AdUQt1RY4qE0G/yEYynKvpaooco/9FQCk6xl/P3SDHfMHsCm IB6v90fehMZes0pd8nZug== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1748358435; x=1748444835; bh=g QgY0IbEIgTAL9f19fiYR1ce+UWeQPbA3pXwH9CA220=; b=ewC4PNULjXs2AVJUk vyXr5TC8mUSFD0xj4EY5H0e2NpbqAyX0mHjdyhctzOfDJ1QuPdiiIsXOZT1Fzt+U fjvgiSFxzEegaH/9bctMDMfn+frzppTeQtvmh3TKlIBzj4fO+1mBKFkhUX7+k5JG pie9Ve3QFX4wU/bujWooMFg4znpDWbJjOJhdQI2zQPY3AsD+dcnbXaWOvJ+gdxN5 Cu4eEoCI2FPj07p4QApkapkxbK8nLdYI33i5hPWbdjZdqCUOrw8r+yPi4Cm/jeMb BrDMYS70gJUbb+SULqw4sxFQpkHgJmmG5/nzAo2fWHEMIbwwcAqkOFpOurxJAdFM nj9OQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgddvtdejtdculddtuddrgeefvddrtd dtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggft fghnshhusghstghrihgsvgdpuffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftd dtnecunecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomhep lmhlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdrug gvqeenucggtffrrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeu heduuddthfeffffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtoh hmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghl vhhhvghrrhgvsehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopedvpdhmohguvg epshhmthhpohhuthdprhgtphhtthhopehpghhsqhhlqdhpvghrfhhorhhmrghntggvsehl ihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrghdprhgtphhtthhopehpghhsqhhlsehmrg hhughisghmrdgtohhm X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 27 May 2025 11:07:14 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1748358432; bh=W1wij6BeoAyDP+21/nPZvlB0KKlXKt797Ag9iamqboo=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=ghRQLYXIyCeGjZzeGYByb/sdBJ8qsI74sdbitnttnq9UiWbT44yaWtqmU1AWCcGj+ 3VbI6uxIFP9HMLzRWp1SPhncBMXEsWtidt8mmoZsX0yPpAWG9DkoAA+S8WJL1GtxO1 IsFpYoLlGbR0h8qpU24Tyy/zcwvLh+m0iW44hvaoEO+Yc+F4/j7Ru0xQFJZFEShN1U J804EvkioqwqizgnzPMEen4OAj1P3P3eV7Txs/3lXMMq3MHnnCKUc1eGCytdj1eJwH yzW6DDcQRkGtmDI4bnTNXpwYxWipcChMB7k3eAS/VJvvOQKWJ+MVFdVtAQF9ue0CU/ liFZOf5w7z3rg== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 79D8590; Tue, 27 May 2025 11:07:12 -0400 (EDT) Date: Tue, 27 May 2025 17:07:12 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Mahdi Bahrami Cc: pgsql-performance@lists.postgresql.org Subject: Re: Database creation performance drop going from pg 14 to pg 15+ Message-ID: <202505271507.xvfbdztae74a@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2025-May-27, Mahdi Bahrami wrote: > Here's how I ran the commands that seem to be at fault when using > PostgresNIO. I only ran the drop-db create-db commands, not the whole > chain, which should still be sufficient: > ``` > PGPASSWORD=xxx psql -U spi_test -h 127.0.0.1 postgres -c "DROP DATABASE IF EXISTS spi_test WITH (FORCE);" -c "CREATE DATABASE spi_test;" > ``` I wonder if this is related to the change to CREATE DATABASE in release 15. Maybe you could test this with "CREATE DATABASE spi_test STRATEGY = file_copy;" and see if that returns it to the original performance. The new strategy is allegedly faster, but maybe in your case, for whatever reason, it isn't. I do wonder why is the database drop/create performance so critical, though. I mean, surely there are more relevant performance problems to be concerned about. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "Tiene valor aquel que admite que es un cobarde" (Fernandel)