Am 08.06.2012 05:43, schrieb sgm:
Yes, the wal segments are updated constantly. You'll have a consistent state in your data files up to the time when the last checkpoint happened. Should a crash occur the server will replay the log segments in the WAL files starting from the one that was marked during the last checkpoint recorded. So,provided all the WAL files generated by the server after the last checkpoint are available, it will always be able to bring the data files to a consistent state. Those WAL files are always kept in the pg_xlog directory. Though I'm also in favor of leveraging a streaming replication configuration as it's more reliable and the window for data loss is very small. |