From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Yudianto Prasetyo <mr.yudianto@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: what is the solution like oracle DB's datafile
Date: Mon, 31 Jan 2022 06:10:27 +0100
Message-ID: <ef0104dee2cc688c56664cb4fb6bb660328743d1.camel@cybertec.at> (raw)
In-Reply-To: <CAN7WH3+HdpkMwXMJGuFCn6FHUZAqxtFo4Lx30SSGMZP7GZCq8g@mail.gmail.com>
References: <CAN7WH3+HdpkMwXMJGuFCn6FHUZAqxtFo4Lx30SSGMZP7GZCq8g@mail.gmail.com>
On Sun, 2022-01-30 at 05:15 +0700, Yudianto Prasetyo wrote:
> I want to ask why postgresql doesn't create a datafile like it has oracle?
>
> 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?
The difference between Oracle and PostgreSQL here is that Oracle implemented its
own file system and volume manager, while PostgreSQL uses the facilities provided
by the operating system.
The correspondence is not perfect, but you can compare an Oracle tablespace to
a logical volume with a file system and a datafile to a physical volume.
So to get the same thing in PostgreSQL, you have to interact with the operating
system: add a new physical volume to the logical volume where your database
resides and extend the file system.
To answer the question "why", here are two points:
- PostgreSQL does not have the (wo)manpower to re-invent the wheel on everything,
so we tend to use existing facilities
- Oracle was developed earlier, and one can argue that in those days file systems
were not so great, so there was more need to write your own
Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: laurenz.albe@cybertec.at, mr.yudianto@gmail.com
Subject: Re: what is the solution like oracle DB's datafile
In-Reply-To: <ef0104dee2cc688c56664cb4fb6bb660328743d1.camel@cybertec.at>
References: <CAN7WH3+HdpkMwXMJGuFCn6FHUZAqxtFo4Lx30SSGMZP7GZCq8g@mail.gmail.com> <ef0104dee2cc688c56664cb4fb6bb660328743d1.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox