News for hackers. Stuff that matters.
Re:Smaller is better – The rise, fall, and rise of flat file... by tarr11 on Sunday May 22, 2022 @12:11PM (#31469677)
Some databases also have the ability to be instantly portable, like a sqlite file.

You can tar up your flat files as well, but that is a separate process and can be time consuming for larger directories.

Perhaps there is a use case for a file system backed by portable database like sqlite, such that you can just mount the volume and send it around without pain, but can prefer to use normal command line utils (ls, rm, grep, etc) instead of interacting via SQL.

Re:Smaller is better – The rise, fall, and rise of flat file... by 42jd on Sunday May 22, 2022 @12:31PM (#31469948)
I’ve had this research paper on my reading list for a while (but haven’t gotten to reading the full thing)[1]. Not necessarily just a file system but It lays out an entire operating system backed by a database and OS state interactions are done through SQL.

1. https://vldb.org/pvldb/vol15/p21-skiadopoulos.pdf

Re:Smaller is better – The rise, fall, and rise of flat file... by ReactiveJelly on Sunday May 22, 2022 @12:19PM (#31469776)
If you're running Postgres in Docker, you can just stop the container and tar up the data volume and start it somewhere else

(This also works without Docker of course, but Docker makes me feel safer when I do stuff like this)

Re:Smaller is better – The rise, fall, and rise of flat file... by latch on Sunday May 22, 2022 @12:45PM (#31470132)
This procedure is officially documented (1).

Since we're talking about copying a folder, I'm not sure why you'd feel safer doing it via an additional layer of abstraction.

(1) https://www.postgresql.org/docs/14/backup-file.html

Re:Smaller is better – The rise, fall, and rise of flat file... by bombela on Sunday May 22, 2022 @12:46PM (#31470144)
Why does Docker makes you feel safer here? Is it because you feel more confident there is no database process still running?
Re:Smaller is better – The rise, fall, and rise of flat file... by ReactiveJelly on Thursday June 02, 2022 @09:01AM (#31594291)
It's more about, I don't like having a global directory namespace that everything gets dumped into.

I know that PG data is usually in /var/lib/postgresql/data, but I like Docker because if I ever need a 2nd or 3rd database on one system, I can give them more meaningful names and not feel like I'm touching Important System-Wide Stuff.

Re:Smaller is better – The rise, fall, and rise of flat file... by ravi-delia on Sunday May 22, 2022 @09:05PM (#31474371)
If you're an ignorant fool such as myself, your knowledge of a database's internals is sufficient only to inspire fear. With Docker I know that whatever black magic the database uses is contained within a black box I can copy wholesale. Anything important must be in there, since I didn't give it anything else!
Re:Smaller is better – The rise, fall, and rise of flat file... by hda111 on Tuesday May 24, 2022 @06:11AM (#31490130)
Does this work even when the Postgres is updated to a newer version? This would make me want to use docker as well.
Re:Smaller is better – The rise, fall, and rise of flat file... by ReactiveJelly on Thursday June 02, 2022 @08:59AM (#31594275)
I'd have to read the Postgres docs to be sure. Postgres has really good docs.

My intuition is that you're expected to do some kind of migration or export/import, because the on-disk format probably changes between major versions.

Re:Smaller is better – The rise, fall, and rise of flat file... by zokier on Sunday May 22, 2022 @05:13PM (#31472862)
> You can tar up your flat files as well, but that is a separate process and can be time consuming for larger directories.

We have file formats like ODF which are just zip packages with regular files inside

Re:Smaller is better – The rise, fall, and rise of flat file... by kuboble on Sunday May 22, 2022 @12:59PM (#31470296)
I believe hdf5 is the format that can serve that purpose.