Title: large inserts and fsync
Forgive me if this is a many-times rehashed topic. I’m very new to postgresql, most of my background is in Oracle.
Running postgres 8.2.5 with one master and three slaves (using slony)
For an upcoming release there is a 16 million row insert that on our test cluster takes about 2.5 hours to complete with all indices dropped beforehand.
If I turn off fsync, it completes in under 10 minutes.
Other than the protection that fsync will allow me should there be a crash in the middle of such a process, my thinking was to turn off fsync for this part of the release, get the insert done, then restart fsync once the insert is complete.
Am I opening myself up to any dangers that aren’t obvious by doing this? Any advice to the contrary? And of course, if I am out of my mind for doing this, please let me know.
Thanks in advance
Aaron