deis / postgres

A PostgreSQL database used by Deis Workflow.
https://deis.com
MIT License
36 stars 22 forks source link

fix(rootfs): enable archive_mode before initial boot #116

Closed bacongobbler closed 8 years ago

bacongobbler commented 8 years ago

It appears that the first WAL log is (occasionally) not being shipped to minio, and that's because we did not enable archive_mode = on for the first database boot in 003_restore_from_backup.sh, which starts shipping WAL logs immediately after booting. We enable archive mode in 004. This is a simple fix that just requires us enabling archive_mode in 003_restore_from_backup.sh before we boot up the server.

closes #114

MANUAL STEPS:

mention-bot commented 8 years ago

By analyzing the blame information on this pull request, we identified @kmala to be a potential reviewer

mboersma commented 8 years ago

I've tested this according to the steps outlined three times, and twice I've deleted the "deis" and all app namespaces and expected helmc install workflow-v2.0.0 to restore everything including my apps, and it's all worked fine.

So LGTM, but I didn't see the original error, so if there are other ways I should test this, let me know.

bacongobbler commented 8 years ago

@mboersma an easy way to test how the error occurs would be to start removing WAL logs from minio:

kd exec -it deis-minio-abd12 bash
cd /home/minio/dbwal/wal_005/
rm -rf *

Then reboot the database. That would expose the checkpoint error.