antirez/redis — Issue #139: A way to SAVE on SHUTDOWN even if no persistence is configured
Author: antirez
Created: 2011-10-14 15:45:40+00:00
State: open
Labels: approved feature, feature request, more design needed, waiting user input

Currently SHUTDOWN will not persist on disk when there are no *save points* configured.
The default semantic is this one as actually the user selected to don't save, so on shutdown we should follow the configuration avoiding to block.

However in certain environments there are Redis instances used as caches where persistence is not vital, but desirable across restarts (for instance a server could be restarted just to switch configuration). SHUTDOWN guarantees the "block the world, save and quit" semantics, that otherwise is only available using:

MULTI
SAVE
SHUTDOWN
EXEC

It could be useful to provide a simple command that can be send via redis-cli able to act as SHUTDOWN but always saving on disk before quitting.

There are three main solutions.

* SAVE with an optional "SHUTDOWN" argument.
* SHUTDOWN with an optional "FORCESAVE" argument.
* A configuration parameter always-save-on-shutdown.

Opening this issue to reason a bit about what is the most useful and semantically coherent option.