1. 14 Jun, 2018 2 commits
    • Simon Riggs's avatar
      Remove spurious code comments in standby related code · dc878ffe
      Simon Riggs authored
      GetRunningTransactionData() suggested that subxids were not worth
      optimizing away if overflowed, yet they have already been removed
      for that case.
      
      Changes to LogAccessExclusiveLock() API forgot to remove the
      prior comment when it was copied to LockAcquire().
      dc878ffe
    • Simon Riggs's avatar
      Remove cut-off bug from RunningTransactionData · 802bde87
      Simon Riggs authored
      32ac7a11 tried to fix a Hot Standby issue
      reported by Greg Stark, but in doing so caused
      a different bug to appear, noted by Andres Freund.
      
      Revoke the core changes from 32ac7a11,
      leaving in its place a minor change in code
      ordering and comments to explain for the future.
      802bde87
  2. 13 Jun, 2018 4 commits
    • Tom Lane's avatar
      Code review for match_clause_to_partition_key(). · 91781335
      Tom Lane authored
      Fix inconsistent decisions about NOMATCH vs UNSUPPORTED result codes.
      If we're going to cater for partkeys that have the same expression and
      different collations, surely we should also support partkeys with the
      same expression and different opclasses.
      
      Clean up shaky handling of commuted opclauses, eg checking the wrong
      operator to see what its negator is.  This wouldn't cause any actual
      bugs given a sane opclass definition, but it doesn't seem helpful to
      expend more code to be less correct.
      
      Improve handling of null elements in ScalarArrayOp arrays: in the
      "op ALL" case, we can conclude they result in an unsatisfiable clause.
      
      Minor cosmetic changes and comment improvements.
      91781335
    • Tom Lane's avatar
      Fix some ill-chosen names for globally-visible partition support functions. · 19832753
      Tom Lane authored
      "compute_hash_value" is particularly gratuitously generic, but IMO
      all of these ought to have names clearly related to partitioning.
      19832753
    • Tom Lane's avatar
      Fix up run-time partition pruning's use of relcache's partition data. · e23bae82
      Tom Lane authored
      The previous coding saved pointers into the partitioned table's relcache
      entry, but then closed the relcache entry, causing those pointers to
      nominally become dangling.  Actual trouble would be seen in the field
      only if a relcache flush occurred mid-query, but that's hardly out of
      the question.
      
      While we could fix this by copying all the data in question at query
      start, it seems better to just hold the relcache entry open for the
      whole query.
      
      While at it, improve the handling of support-function lookups: do that
      once per query not once per pruning test.  There's still something to be
      desired here, in that we fail to exploit the possibility of caching data
      across queries in the fn_extra fields of the relcache's FmgrInfo structs,
      which could happen if we just used those structs in-place rather than
      copying them.  However, combining that with the possibility of per-query
      lookups of cross-type comparison functions seems to require changes in the
      APIs of a lot of the pruning support functions, so it's too invasive to
      consider as part of this patch.  A win would ensue only for complex
      partition key data types (e.g. arrays), so it may not be worth the
      trouble.
      
      David Rowley and Tom Lane
      
      Discussion: https://postgr.es/m/17850.1528755844@sss.pgh.pa.us
      e23bae82
    • Alexander Korotkov's avatar
      Documentation improvement for pg_trgm · e146e4d0
      Alexander Korotkov authored
      Documentation of word_similarity() and strict_word_similarity() functions
      contains some vague wordings which could confuse users.  This patch makes
      those wordings more clear.  word_similarity() was introduced in PostgreSQL 9.6,
      and corresponding part of documentation needs to be backpatched.
      
      Author: Bruce Momjian, Alexander Korotkov
      Discussion: https://postgr.es/m/20180526165648.GB12510%40momjian.us
      Backpatch: 9.6, where word_similarity() was introduced
      e146e4d0
  3. 12 Jun, 2018 5 commits
  4. 11 Jun, 2018 13 commits
  5. 10 Jun, 2018 6 commits
  6. 09 Jun, 2018 1 commit
  7. 08 Jun, 2018 5 commits
  8. 07 Jun, 2018 3 commits
  9. 06 Jun, 2018 1 commit
    • Alvaro Herrera's avatar
      Fix function code in error report · eee381ef
      Alvaro Herrera authored
      This bug causes a lseek() failure to be reported as a "could not open"
      failure in the error message, muddling bug reports.  I introduced this
      copy-and-pasteo in commit 78e12201.
      
      Noticed while reviewing code for bug report #15221, from lily liang.  In
      version 10 the affected function is only used by multixact.c and
      commit_ts, and only in corner-case circumstances, neither of which are
      involved in the reported bug (a pg_subtrans failure.)
      
      Author: Álvaro Herrera
      eee381ef