Re: what is the solution like oracle DB's datafile - Mailing list pgsql-general

From Julien Rouhaud
Subject Re: what is the solution like oracle DB's datafile
Date
Msg-id 20220130131111.zlabglymewik3zfc@jrouhaud
Whole thread Raw
In response to what is the solution like oracle DB's datafile  (Yudianto Prasetyo <mr.yudianto@gmail.com>)
List pgsql-general
Hi,

On Sun, Jan 30, 2022 at 05:15:33AM +0700, Yudianto Prasetyo wrote:
> 
> I'm confused when I have 2 HDD. HDD 1 is used to install the OS and
> postgresql database. when HDD 1 is full. how to increase the capacity of
> postgresql database with HDD 2 (without RAID system)?
> 
> is there any other way like oracle DB's "add datafile" which can be used to
> add capacity to another HDD?

I don't know how those datafiles are working, but with postgres the solution is
to create additional tablespaces pointing to the new drives, see
https://www.postgresql.org/docs/current/sql-createtablespace.html.

Note that a single non-partitioned table can only exist on a single tablespace,
so if you have a gigantic table that's becoming bigger than you disk, the
solution might be to partition it and store different partitions on different
tablespaces.



pgsql-general by date:

Previous
From: Mladen Gogala
Date:
Subject: Re: pg_try_advisory_lock is waiting?
Next
From: Yudianto Prasetyo
Date:
Subject: Re: what is the solution like oracle DB's datafile