6 ms·
I feel like this feature replaces almost all of Mongo's use cases!
by zachmax 9y ago
I feel like this feature replaces almost all of Mongo's use cases!
- htsh 9y agoI'm interested. When you say almost, can you elaborate on any remaining use cases when you'd use Mongo?
- byefruit 9y agoAt my previous company we made heavy use of its lossy compression feature.
- deleted 9y ago[deleted]
- X86BSD 9y agoYou would get compression with Postgres running on ZFS.
- kinghajj 9y agoLossy compression, not lossless.
- crypto5 9y agoIn random cloud provider you may not get FS with compression on your machine..
- sqeaky 9y agoDatabase plus Copy-On-Write file systems sound like a bad idea. I am imagining a modest 100gb database being re-written for every change. I am sure there is some way to work around this, but wouldn't this be the default behavior with a typical database and typical COW file system?
- X86BSD 9y agoYou might be interested in reading this paper: https://people.freebsd.org/~seanc/postgresql/scale15x-2017-postgresql_zfs_best_practices.pdf https://people.freebsd.org/~seanc/postgresql/scale15x-2017-p...
- sqeaky 9y agoI am interested and I appreciate the thought and link, however these appear to be the slides to a talk without the actual talk. If so they are of limited use because the slides never have all the information the presenter has, and that information is often just a summary. Is this the correct talk: https://youtu.be/dwMQXLOXUco?t=5380 https://youtu.be/dwMQXLOXUco?t=5380 ?
- X86BSD 9y agoYes, sorry about that, that is the corresponding talk to the slides. Thanks for pointing that out.
- cryptonector 9y agoFirst, you have to make sure the page sizes for the FS and DB match. That's a critical requirement. But yes, you'll get write expansion twice.
- adamzochowski 9y agoPostgresql has compression by default on, for all large text and other large fields that get great benefit of compression. From documentation -" The technique is affectionately known as TOAST (or "the best thing since sliced bread"). "- https://www.postgresql.org/docs/8.0/static/storage-toast.html https://www.postgresql.org/docs/8.0/static/storage-toast.htm...
- pkhagah 9y agoWhat lossy compression? Were you guys throwing bits into /dev/null?
- infogulch 9y agoIs that related to the cool "hash compression" technology I hear about? Apparently it can compress an arbitrarily large file into just a few bytes, amazing!
- fnayr 9y agoI know it's pretty popular to hate on Mongodb now (even more so than it was to love on Mongodb 4 years ago), but there are still areas where it's better than a relational db. In game development, it's extremely helpful (especially as an "indie") to change the structure on a whim so easily. Also based on the design of the game I'm working on, I believe the document structure captures the structure of the data so much better than if I was forced to make a bunch of tables. This aides in understanding the representation of our game's data, and I believe (but haven't tested) it will be faster than a relational db for my use case, but that's an ancillary benefit anyway.
- ssijak 9y agoBut the posters above you said that JSON and JSONB types in Postgres, and functionality around them, eliminated the need to use other databases for document type data. What you are describing can be done with PostgreSQL. One thing that is missing is better client libraries that make use of those data types. Morphia wins for now in that regard.
- fnayr 9y agoMy claim wasn't that it didn't fulfill their needs, it was that it doesn't fulfill all needs (gamedev is one example that I'm familiar with). Postgres storing JSON types != All mongo functionality I'm sure I could achieve everything I'm doing in mongo by some roundabout way in Postgres, but if you're doing a large amount of reading/modifying partial fields within JSON structure, it's the exact use case for mongo.
- jerrysievert 9y agohttps://www.github.com/JerrySievert/MongoLike https://www.github.com/JerrySievert/MongoLike that said, I actually use partial JSONB updates on a regular basis, but I tend to use PLV8 to do the heavy lifting.
- threeseed 9y ago
- jonknee 9y agoAs soon as Postgres adds the "random data loss" feature they will have a full superset of Mongo.
- colanderman 9y agoYou can always turn off fsyncs…
- knodi 9y agoThen you might as well use pg.
- lima 9y agoI think he meant that you can turn off fsyncs in pg in order to add random data loss :-)
- X86BSD 9y agoYou might be interested in this paper where the author touches on fsync. https://people.freebsd.org/~seanc/postgresql/scale15x-2017-postgresql_zfs_best_practices.pdf https://people.freebsd.org/~seanc/postgresql/scale15x-2017-p...