Skip to content
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

Forbid having _revision_expired < _revision_added in _revision tables #78

Open
strk opened this issue Feb 14, 2018 · 5 comments
Open

Forbid having _revision_expired < _revision_added in _revision tables #78

strk opened this issue Feb 14, 2018 · 5 comments

Comments

@strk
Copy link
Contributor

strk commented Feb 14, 2018

The function ver_get_$schema$_$table$_revision(p_revision integer) (and possibly other) assume that _revision_expired is always bigger or equal to _revision_added failing which no revision would ever be considered to contain the corresponding record of a table.

For this reason it would make sense to enforce such condition as an integrity constraint (a check).

Such database corruption was spotted and reported by downstream project here: https://github.com/linz/ds-dev-team/issues/46

@strk strk added this to the 1.5.0 milestone Feb 14, 2018
@strk strk self-assigned this Feb 14, 2018
@palmerj
Copy link
Contributor

palmerj commented Feb 14, 2018

Would be good to understand the performance hit of such a constraint

@strk
Copy link
Contributor Author

strk commented May 9, 2018

It could be now a good occasion to test that performance hit, do you want a PR for this @imincik for testing as part of your current performance analisys ?

@strk
Copy link
Contributor Author

strk commented May 10, 2018

PR #121 is ready for review/test

@imincik imincik assigned dwsilk and unassigned dwsilk May 14, 2018
@strk strk modified the milestones: 1.5.0, 1.6.0 Sep 26, 2018
@stale
Copy link

stale bot commented Nov 10, 2018

This issue has been automatically marked as stale as there has not been any activity for sometime. The issue will be closed in 14 days if no further activity.

@stale stale bot added the Stale label Nov 10, 2018
@imincik
Copy link
Contributor

imincik commented Nov 10, 2018

Still relevant.

@stale stale bot removed the Stale label Nov 10, 2018
@strk strk modified the milestones: 1.6.0, 1.7.0 Jan 14, 2019
@strk strk removed this from the 1.7.0 milestone Jul 25, 2019
@strk strk removed their assignment Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

4 participants