Re: Creating a new database on a different file system

From: Luca Ferrari <fluca1978(at)gmail(dot)com>
To: Ian Dauncey <Ian(dot)Dauncey(at)bankzero(dot)co(dot)za>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Creating a new database on a different file system
Date: 2025-03-17 14:51:19
Message-ID: CAKoxK+4RTRP+phsnJgMjVzFVjmAHdu2wCXG_5YtsFR_fJEY6_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Mar 17, 2025 at 3:49 PM Ian Dauncey <Ian(dot)Dauncey(at)bankzero(dot)co(dot)za> wrote:
>
> We have created a few databases on the file system defined in the postgresql.conf, but now I would like to create another database within the same cluster but on a different file system.
>
> Is this possible and if so, how do we go about it.

create a tablespace on the filesystem you want to use, and then create
the database adding the `WITH TABLESPACE` clause.
See <https://www.postgresql.org/docs/17/sql-createtablespace.html>

Luca

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tim Gerber 2025-03-17 14:51:55 Re: Creating a new database on a different file system
Previous Message Ian Dauncey 2025-03-17 14:48:42 Creating a new database on a different file system