Delete conflict timestamp handling #320
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Log in spock.resolutions when we receive a DELETE that is older than
the existing row (the DELETE was processed late).
Prior to this, the DELETE would be processed and the existing row deleted.
Now we can ignore since the timestamp is older.
While we are harmonizing conflict types with Postgres, no such type
exists for a late DELETE, so a new one was created, SPOCK_CT_DELETE_LATE.
To accommodate, moved to Spock having its own conflict types, while trying
to match those in Postgres for the large overlap.
Also added spock.output_delay GUC to make internal testing easier for
this case and future testing. It optionally adds a delay to the output plugin in
the begin callback and is used by a new test that was added. That is, one
can execute SQL on one node, then execute other SQL on another while
knowing that the earlier operations will arrive afterwards and create conflicts.