[colug-432] SystemD: long-running NON-forking units?

Rick Hornsby richardjhornsby at gmail.com
Sat Feb 25 13:44:25 EST 2017


On February 25, 2017 at 12:17:50, Mike Plemmons (mikeplemmons at gmail.com)
wrote:

This may not be an answer you are looking for but one option could be to
add execstartpre and execstartpost entires to the postgres unit file that
does the tar and untar of /var.

Another option is to usb attach an external drive and have /var or at least
the postgres data on the external drive.

TBH, I like the USB drive option better. It makes me nervous to depend on a
shutdown script to ensure my effectively cached-in-memory data makes it to
permanent storage before the power goes away. If anything goes wrong -
crash, inadvertent power loss, the commit/write back script fails etc - any
data written since _system startup_ is a goner. That could be a bunch of
data over a long time.

Maybe postgres can be tuned to write to disk less often, allowing you to
save write cycles to the SD card?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.colug.net/pipermail/colug-432/attachments/20170225/c6acf000/attachment-0001.html 


More information about the colug-432 mailing list