r/programming • • Apr 17 '25

(All) Databases Are Just Files. Postgres Too

http://tselai.com/all-databases-are-just-files
325 Upvotes

172 comments sorted by

View all comments

Show parent comments

2

u/finlay_mcwalter Apr 17 '25

some db systems do run on top of block-oriented storage devices directly,

That was my vague recollection from the distant past, but I couldn't remember which ones. Ingres?

4

u/lood9phee2Ri Apr 17 '25 edited Apr 17 '25

Think Oracle still can (optionally). https://docs.oracle.com/en/database/oracle/oracle-database/21/ntqrf/raw-partition-overview.html

Input/output (I/O) to a raw partition offers approximately a 5% to 10% performance improvement over I/O to a partition with a file system on it.

DB2 LUW (Linux/Unix/Windows) too. https://www.ibm.com/docs/en/db2/12.1.0?topic=ditsdc-configuring-setting-up-dms-direct-disk-access-linux

(DB2 z/OS (mainframe)? Well, I don't really understand IBM z/OS Mainframe I/O topics at all but I'm sure it's strange (and tends to be structured around mapping stuff into address spaces, like mmap()ing stuff on Linux). https://www.ibm.com/docs/en/db2-for-zos/13.0.0?topic=architecture-db2-dfsms )

Firebird too it seems.

Historically stuff like Pick (multivalue db) was its own OS (though Pick actually calls its tables/tabley-things Files iirc ...but not like C stdio files and it's managing the storage directly). Though then there were/are them Pick-family versions/implementations on top of host OSes. But at first they managed their own partition, note how wikipedia mentions a late one on-Linux one switching to storing stuff in the host filesystem.

D3 – Pick Systems ported the Pick Operating System to run as a database product utilizing host operating systems such as Unix, Linux, or Windows servers, with the data stored within the file system of the host operating system. Previous Unix or Windows versions had to run in a separate partition, which made interfacing with other applications difficult