Re: Curious question about physical files to store database

Поиск
Список
Период
Сортировка
От Patrick Dung
Тема Re: Curious question about physical files to store database
Дата
Msg-id 1383662556.91933.YahooMailNeo@web193502.mail.sg3.yahoo.com
обсуждение исходный текст
Ответ на Re: Curious question about physical files to store database  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Ответы Re: Curious question about physical files to store database  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Re: Curious question about physical files to store database  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general


On Monday, November 4, 2013 10:09 PM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
Patrick Dung wrote:

> As I have seen, some database created or pre-allocate large physical files on the file system to as
> the backend of the database tablespace.
>
> For Postgresql, I have observed that it created several files in the base and global directory.
>
> It may be by design, what is the pros and cons of this behavior?


You are a bit unspecific; are you talking about Oracle?

The disk layout is of course by design.

Oracle uses large container files and keeps its data in those.
As far as I know, this is to bypass file system functionality.
Oracle usually recommends direct I/O and bypasses file system
functionality (caching etc.) as much as possible.

I guess one reason for this is that, historically, file system
implementations incurred more overhead than they do now and had
all sorts of other problems with larger amounts of data.
These days, filesystems perform much better, so this is no longer
necessary, but Oracle is quite old software.

Another reason may be Oracle's quest to rule the world, and the
storage layer is part of that.  Lately, Oracle tries to get everybody
to use ASM, their storage layer, which completely bypasses
file system functionality.

PostgreSQL, on the other hand, does not have the resources or
intentions to write a better file system and actually uses
file system capabilities like caching to improve performance.

PostgreSQL keeps what Oracle calls segments as individual files
in a directory structure.

Yours,
Laurenz Albe


--------------------------------------------------------------------------------------

I have seen some databases product that allocate small number of large files.

Please correct me if I am wrong:

MSSQL (one file is the data and another file for the transaction log)
MySQL with InnoDB
Oracle
DB2

Thanks and regards,
Patrick

В списке pgsql-general по дате отправления:

Предыдущее
От: Jing Fan
Дата:
Сообщение: Re: WITH RECURSIVE doesn't work properly for me
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Junk date getting uploaded into date field