New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP wal-restore #977
WIP wal-restore #977
Conversation
* First version of finding missing wal segments logic
Hi! Many WAL-G developers, like me and you, speak the Russian language. But we do not want knowledge of Russian to be a prerequisite to participate in WAL-G discussions. In fact, the opinion of every community member matters. Please, use English in Github discussions. |
Hello! I updated my first comment. |
* firstly we find common ancestor * then gets all WAL segments after this common ancestor segment * and download founded files
And question:
|
I think that we just can download the WAL files that are missing on the pg_rewind target up to the segment number of divergence.
If you don't overwrite any existing files, why not? Also, if you do overwrite some WAL files, I don't think this is dangerous since we overwrite them with the version from storage. And I think we should prefer the storage WAL files to the local ones.
I think comparing the |
…ving_ready_rename.sh
* undo changing from target to source * fixed docker test * renamed docker test into docker-compose.yml to less confusing
* refactoring
* fix problem after merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
One more thing: Can you please add some information regarding this feature to the documentation?
* fixed pg control data bug with size * added unittests for this case * added description about wal-restore in docs/PostgreSQL.md * fixed description of wal-restore
I think we can close #850. |
That what I think:
I'm scary what I don't handle this case: we need wal segments that names already exists in local wal directory and need to rewrite them (Can this happen?). Because in current logic if we have wal segment with some name we can't download this wal file from external storage.
This right that I will download missed segments instantly in local wal directory? I think this dangerous :)
And I want to know how in one directory named 'internal' we have two packages: 'internal' and 'internal_test'.
And yes, my code should be covered by tests. But before this I want know what I have right architecture of the utility.
UPD:
UPD2: