Re: Creating a new database on a different file system - Mailing list pgsql-general

From Luca Ferrari
Subject Re: Creating a new database on a different file system
Date
Msg-id CAKoxK+4RTRP+phsnJgMjVzFVjmAHdu2wCXG_5YtsFR_fJEY6_Q@mail.gmail.com
Whole thread Raw
In response to Creating a new database on a different file system  (Ian Dauncey <Ian.Dauncey@bankzero.co.za>)
Responses Re: Creating a new database on a different file system
List pgsql-general
On Mon, Mar 17, 2025 at 3:49 PM Ian Dauncey <Ian.Dauncey@bankzero.co.za> wrote:
>
> We have created a few databases on the file system defined in the postgresql.conf, but now I would like to create
anotherdatabase 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



pgsql-general by date:

Previous
From: Ian Dauncey
Date:
Subject: Creating a new database on a different file system
Next
From: Tim Gerber
Date:
Subject: Re: Creating a new database on a different file system