Re: Redis 16 times faster than Postgres?

Ben Chobot <bench@silentmedia.com>

From: Ben Chobot <bench@silentmedia.com>
To: Ron <ronljohnsonjr@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Date: 2019-09-30T03:52:10Z
Lists: pgsql-general
On Sep 29, 2019, at 8:44 PM, Ron <ronljohnsonjr@gmail.com> wrote:
> 
> On 9/29/19 8:09 PM, Steve Litt wrote:
>> On Mon, 30 Sep 2019 07:46:14 +1000
>> Nathan Woodrow <madmanwoo@gmail.com> wrote:
>> 
>>> Redis is a in memory database so I would except it to be always much
>>> faster..
>> Is there a way to have Redis periodically update an on-disk backup?
>> That would be great, but otherwise you're at the mercy of your power
>> company (here in Central Florida it's routine for power to go down and
>> stay down for five hours).
> 
> It would be criminal for it not to have an async writer process flushing modified pages to disk.  And to not have a UPS that you've tested.

It's perfectly reasonable to use Redis as a caching layer without any persistence at all. In such cases, flushing state to disk is a waste of resources. 

(For other use cases, yes, Redis allows you to flush state to disk.)