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
Same schema logical fixes #108
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
operators - Use text descriptions for result type and operands; ignore related oids triggers - Include table name in key to prevent false positive when another table has a trigger with the same name. Use textual trigger definition; ignore tgqual represe functions - Use text function definition; ignore oid based types and defaults. constraints - Include table name in key to prevent false positive when another table has a constraint with the same name. Use text constraint definition; ignore oid based values. sequence - Ignore last_value; I'm confused as to why we'd want to know this on a schema check. But if required could be added back in with an optional filter instead. indexes - Ignore reltablespace oid; we check the tablespace name anyway. Ignore indkey attnum which can differ when tables have been altered differently but are otherwis
…s rather than pg_user. This resolves issues where objects owned by a group role are missing in various checks (check_same_schema, check_commitratio, check_hitratio), or detail is missing (check_database_size), or results not filtered as intended (check_last_vacuum_analyze, check_relation_size). Conflicts: check_postgres.pl
This relates to a change in the character representing a simple match on a foreign key stored in the confmatchtype field changing from 'u' to 's' between postgresql 9.2 and 9.3. Ref: http://www.postgresql.org/docs/9.2/static/catalog-pg-constraint.html http://www.postgresql.org/docs/9.3/static/catalog-pg-constraint.html
…nstraint triggers These triggers have a name containting the triggers oid which mismatches on logical replicas; so to exclude these just ensure tgconstrindid is zero.
…mparing operators.
…ence last_value check. Fixes for changes made to same_schema in commit f8145cd * Amend constraint unit tests in t/02_same_schema.t to take into account we now return the table name * Reinstate checking of a sequences last_val, and instead allow users of asynchronous replication to override with '--assume-async' option
…objects owned by group roles in commit d55287f
As per the manual: "To exclude objects of a certain type by a regular expression against their name, use "noname=regex"." However the actual check in the script would only filter on an exact match; switched to regex.
glynastill
force-pushed
the
same_schema_logical_fixes
branch
from
June 7, 2016 12:03
0d34aec
to
e32a893
Compare
rebased onto master |
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This branch contains changes to check_same_schema mainly to assist when comparing schemas across logical replicas.
* support checking across logical replicas by checking logical name/type/definition when comparing operators/indices/functions/triggers etc rather than oids
* add '--assume-async' option to skip checking sequnece last_val on asyncronous replicas
* stop picking up oid named deferrable unique constraint triggers in trigger check
* correctly identify objects owned by group roles
* allow constraint check to work across <= 9.2 and >= 9.3 (pg_constraint.confmatchtype = 'u' == 's')
* include table name in key used to identify trigger and constraint checks to prevent false positives
* --filter on regex (as per the manual) rather than equality