Re: Database creation performance drop going from pg 14 to pg 15+

From: Álvaro Herrera <alvherre(at)kurilemu(dot)de>
To: Mahdi Bahrami <pgsql(at)mahdibm(dot)com>
Cc: pgsql-performance(at)lists(dot)postgresql(dot)org
Subject: Re: Database creation performance drop going from pg 14 to pg 15+
Date: 2025-05-27 15:07:12
Message-ID: 202505271507.xvfbdztae74a@alvherre.pgsql
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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)

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mahdi Bahrami 2025-05-28 11:09:20 Re: Database creation performance drop going from pg 14 to pg 15+
Previous Message Mahdi Bahrami 2025-05-27 08:12:31 Re: Database creation performance drop going from pg 14 to pg 15+