3 ms·
The fact that PGSQL doesn't shit all over your data due to bugs (like Mongo) or lose it if you haven't checkpointed it to disk recently (like Redis) was a prett
by harrytuttle 13y ago
The fact that PGSQL doesn't shit all over your data due to bugs (like Mongo) or lose it if you haven't checkpointed it to disk recently (like Redis) was a pretty big win for PG to start with...
- antirez 13y agoRedis has AOF persistence that does not need any checkpointing to ensure your data will be there. PostgreSQL is awesome and I love it, but it has nothing to do with you not reading the Redis documentation :-) \o/ for PostgreSQL, anyway.
- harrytuttle 13y agoFair point. To be honest my redis knowledge is about a year old. The AOF however does have to be loaded on startup which is a big problem especially if it wasn't compacted.
- jfb 13y agoRedis and postgres are very different tools serving different problem domains. If you're able to swap one out for the other, you might want to reëvaluate your architecture.
- jeltz 13y agoNot always. Both can be used as backends for persistent message queues since both have built-in pub/sub. If you do not have high throughput or latency requirements both are perfectly fine for this. If you already use PostgreSQL it is not always worth breaking out key value storage into Redis either.
- ecoffey 13y agoRedis Pub/Sub is /not/ persistent. You can go the resque / sidekiq route and use a List and do blocking pops. But you have to make sure you have some persistence in place that you feel comfortable with (maybe a master / slave setup, with master handling all real queue load, and the slave doing AOF for recoverability).
- danmaz74 13y agoThat's why I'm using both in my project :)
- jimktrains2 13y agoAnother diaeresis user! yay!
- sanderjd 13y agoCheck out antirez' great article about persistence[0] if you're interested in learning how to use redis in a more sophisticated manner than periodic checkpoints to disk. 0: http://oldblog.antirez.com/post/redis-persistence-demystified.html http://oldblog.antirez.com/post/redis-persistence-demystifie...