I will be getting a SAN with a battery backed write cache for a new Postgres data warehouse and am not sure what settings to apply to make proper use of it. If the cache is enabled in the SAN is that enough or do I need to set wal_sync_method, synchronous_commit or others?
The warehouse will be handling 5-10 million row inserts a day once the current data sources are turned on. This will most likely grow in the future.
We will be using Postrges 9.3 and most likely Centos 6.4.
Thanks in advance.
Best Answer
Literature
I gathered you some links you should read:
Possible Workflow
Basically your workflow might be the following, which is extracted as a combination of all tips of the above links:
fsync
if it is not.synchronous_commit
to "on" (or "local") if it is set to "off".diskchecker.pl
just for sanity to see if you bought something good and it is configured correctly.show wal_sync_method;
pg_test_fsync
FLUSH CACHE EXT
/SYNCHRONIZE CACHE
problem.wal_sync_method
to.full_page_writes
(see last paragraph here).Remark (why this might not be enough)
Note that this seems very reliable, but quoted from one of the links above:
So even having a BBU and a correctly configured server instance, this does not remove the burden to backup everything regularly, and does not remove the possibility to loose some data.
Legal Note
I am not responsible for any lost data ;) neither due to lack of advice here or a wrong tip, nor through anything else.