1. 12 Jul, 2019 1 commit
    • David Rowley's avatar
      Fix RANGE partition pruning with multiple boolean partition keys · cfde2349
      David Rowley authored
      match_clause_to_partition_key incorrectly would return
      PARTCLAUSE_UNSUPPORTED if a bool qual could not be matched to the current
      partition key.  This was a problem, as it causes the calling function to
      discard the qual and not try to match it to any other partition key.  If
      there was another partition key which did match this qual, then the qual
      would not be checked again and we could fail to prune some partitions.
      
      The worst this could do was to cause partitions not to be pruned when they
      could have been, so there was no danger of incorrect query results here.
      
      Fix this by changing match_boolean_partition_clause to have it return a
      PartClauseMatchStatus rather than a boolean value.  This allows it to
      communicate if the qual is unsupported or if it just does not match this
      particular partition key, previously these two cases were treated the
      same.  Now, if match_clause_to_partition_key is unable to match the qual
      to any other qual type then we can simply return the value from the
      match_boolean_partition_clause call so that the calling function properly
      treats the qual as either unmatched or unsupported.
      
      Reported-by: Rares Salcudean
      Reviewed-by: Amit Langote
      Backpatch-through: 11 where partition pruning was introduced
      Discussion: https://postgr.es/m/CAHp_FN2xwEznH6oyS0hNTuUUZKp5PvegcVv=Co6nBXJ+mC7Y5w@mail.gmail.com
      cfde2349
  2. 11 Jul, 2019 1 commit
  3. 10 Jul, 2019 7 commits
  4. 09 Jul, 2019 5 commits
  5. 08 Jul, 2019 5 commits
  6. 07 Jul, 2019 2 commits
  7. 06 Jul, 2019 5 commits
  8. 05 Jul, 2019 8 commits
  9. 04 Jul, 2019 6 commits