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

Same schema logical fixes #108

Merged
merged 10 commits into from
Jun 7, 2016

Commits on Jun 7, 2016

  1. Fix same_schema to ignore some non-logical schema based values:

    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
    glynastill committed Jun 7, 2016
    Configuration menu
    Copy the full SHA
    5b3499e View commit details
    Browse the repository at this point in the history
  2. Modify checks that return or rely on a user name to reference pg_role…

    …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
    glynastill committed Jun 7, 2016
    Configuration menu
    Copy the full SHA
    c1e1aeb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3e5f5f7 View commit details
    Browse the repository at this point in the history
  4. Fix same schema to treat pg_constraint.confmatchtype = 'u' = 's'

    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
    glynastill committed Jun 7, 2016
    Configuration menu
    Copy the full SHA
    dcb6455 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    23fdf93 View commit details
    Browse the repository at this point in the history
  6. Fix trigger check in check_same_schema to ignore deferrable unique co…

    …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.
    glynastill committed Jun 7, 2016
    Configuration menu
    Copy the full SHA
    362890e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    59f11cd View commit details
    Browse the repository at this point in the history
  8. same_schema: constraint unit test include table name + reinstate sequ…

    …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
    glynastill committed Jun 7, 2016
    Configuration menu
    Copy the full SHA
    6160c12 View commit details
    Browse the repository at this point in the history
  9. Fix username field in check_txn_idle; broken when adding support for …

    …objects owned by group roles in commit d55287f
    glynastill committed Jun 7, 2016
    Configuration menu
    Copy the full SHA
    506a408 View commit details
    Browse the repository at this point in the history
  10. Fix "--filter" logic to honour regular expressions

    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 committed Jun 7, 2016
    Configuration menu
    Copy the full SHA
    e32a893 View commit details
    Browse the repository at this point in the history