public inbox for [email protected]  
help / color / mirror / Atom feed
Creating a new database on a different file system
2+ messages / 2 participants
[nested] [flat]

* Creating a new database on a different file system
@ 2025-03-17 14:48 Ian Dauncey <[email protected]>
  2025-03-17 14:51 ` Re: Creating a new database on a different file system Tim Gerber <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Ian Dauncey @ 2025-03-17 14:48 UTC (permalink / raw)
  To: pgsql-general

Hi All

We are running an old version of PostgreSQL on a Linux Server.
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.

In a nutshell:

I have the following statement defined in the postgresql.conf file - data_directory = '/opt/pgdata_postgres'

I have created the following database datadb1, datadb2 (plus all default databases)

Now I want to create a third database datadb3, but it needs to be created on file system "/opt/pgdata1_postgres"  and not on '/opt/pgdata_postgres'

Is this possible

Regards
Ian




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Creating a new database on a different file system
  2025-03-17 14:48 Creating a new database on a different file system Ian Dauncey <[email protected]>
@ 2025-03-17 14:51 ` Tim Gerber <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Tim Gerber @ 2025-03-17 14:51 UTC (permalink / raw)
  To: Ian Dauncey <[email protected]>; +Cc: pgsql-general

Hi Ian,

Tablespaces would work... take a look:
https://www.postgresql.org/docs/current/manage-ag-tablespaces.html

Best,
Tim

On Mon, Mar 17, 2025 at 9:49 AM Ian Dauncey <[email protected]>
wrote:

> Hi All
>
>
>
> We are running an old version of PostgreSQL on a Linux Server.
>
> 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.
>
>
>
> In a nutshell:
>
>
>
> I have the following statement defined in the postgresql.conf file -
> data_directory = '/opt/pgdata_postgres'
>
>
>
> I have created the following database datadb1, datadb2 (plus all default
> databases)
>
>
>
> Now I want to create a third database datadb3, but it needs to be created
> on file system “/opt/pgdata1_postgres”  and not on ‘/opt/pgdata_postgres'
>
>
>
> Is this possible
>
>
>
> Regards
>
> Ian
>
>
>
>
>


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-03-17 14:51 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-03-17 14:48 Creating a new database on a different file system Ian Dauncey <[email protected]>
2025-03-17 14:51 ` Tim Gerber <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox