Basic PITR testcase#22
Conversation
| break | ||
| end | ||
| sleep(1000) | ||
| end |
There was a problem hiding this comment.
Seems like we need a helper function for tailing logs.
There was a problem hiding this comment.
Also why don't you tell it to shut down when recovery is done rather than to pause?
There was a problem hiding this comment.
I could extract it to a helper, but so far this is the only place where we are tailing logs.
As for shutdown: promote would make more sense, it could replace the execute query below, but both are just 1 line in the script.
There was a problem hiding this comment.
I think extracting it as a local helper in this file would make the code easier to read.
| w:discover_existing_schema() | ||
| w:calculate_database_checksums(checksumFile) | ||
|
|
||
| ret = os.execute("/usr/bin/diff " .. checksumFile .. " " .. backupChecksumFile) |
There was a problem hiding this comment.
Why do you use the full qualified path here but not for cp and mkdir?
There was a problem hiding this comment.
Also is there a reason it is comapred using diff and not in Lua?
There was a problem hiding this comment.
Because the background process only accepts full paths (execve), and somehow I forgot that I can just write diff here, I'll fix that.
As for why - it seems easier to call diff than to write a lua function to do that.
This commit adds a simple PITR testcase with the pg_simple test runner that verifies that 1. PITR works 2. data checksums before and after recovery are the same.
This commit adds a simple PITR testcase with the pg_simple test runner that verifies that 1. PITR works 2. data checksums before and after recovery are the same.