Efficient cleanup and the end of recovery
In recent years, recovery.conf
has become more and more powerful. Back in the early days (that is, before PostgreSQL 9.0), there was barely anything more than restore_command
and some setting related to recovery_target_time
. More modern versions of PostgreSQL already offer a lot more and give you the chance to control your replay process in a nice and professional way.
In this section, you will learn what kind of settings there are and how you can make use of those features easily.
Gaining control over the restart points
So far, we have archived the XLOG indefinitely. Just like in real life, infinity is a concept that causes trouble. As John Maynard Keynes stated in his famous book, The General Theory of Employment, Interest, and Money:
"In the long run, we are all dead."
What applies to Keynesian stimulus is equally true in the case of XLOG archiving; you simply cannot keep doing it forever. At some point, the XLOG has to be thrown away.
To make cleanup...