1. 09 May, 2020 6 commits
    • Tom Lane's avatar
      Doc: fix assorted misstatements of fact in catalog & system view docs. · 9356e435
      Tom Lane authored
      I made up a very crude hack to compare the docs with reality (as
      embodied in the system catalogs) ... and indeed they don't match
      everywhere.  Missing oid columns, wrong data types, wrong "references"
      links, columns listed in the wrong order.  None of this seems quite
      important enough to back-patch.
      9356e435
    • Tom Lane's avatar
      Fix findoidjoins to recognize oidvector columns. · 96d175e3
      Tom Lane authored
      Somehow we'd never noticed this oversight, even though it means
      that such basic columns as pg_proc.proargtypes were not being
      validated by the oidjoins test.  Correct the query and update
      the test script with the newly-found dependencies.
      96d175e3
    • Tomas Vondra's avatar
      Simplify show_incremental_sort_info a bit · ebeb3dea
      Tomas Vondra authored
      Incremental sort always processes at least one full group group before
      switching to prefix groups, so it's enough to check just the number of
      full groups. There was no risk of division by zero due to the extra
      condition, but it made the code harder to understand.
      
      Reported-by: Ranier Vilela
      Discussion: https://postgr.es/m/CAEudQAp+7qoS92-4V1vLChpdY3vEkLCbf+gye6P-4cirE-0z0A@mail.gmail.com
      ebeb3dea
    • Tomas Vondra's avatar
      Do no reset bounded before incremental sort rescan · 9155b4be
      Tomas Vondra authored
      ExecReScanIncrementalSort was resetting bounded=false, which means the
      optimization would be disabled on all rescans. This happens because
      ExecSetTupleBound is called before the rescan, not after it.
      
      Author: James Coleman
      Reviewed-by: Tomas Vondra
      Discussion: https://postgr.es/m/20200414065336.GI1492@paquier.xyz
      9155b4be
    • Tomas Vondra's avatar
      Fix handling of REWIND/MARK/BACKWARD in incremental sort · c4427226
      Tomas Vondra authored
      The executor flags were not handled entirely correctly, although the
      bugs were mostly harmless and it was mostly comment inaccuracy. We don't
      need to strip any of the flags for child nodes.
      
      Incremental sort does not support backward scans of mark/restore, so
      MARK/BACKWARDS flags should not be possible. So we simply ensure this
      using an assert, and we don't bother removing them when initializing
      the child node.
      
      With REWIND it's a bit less clear - incremental sort does not support
      REWIND, but there is no way to signal this - it's legal to just ignore
      the flag. We however continue passing the flag to child nodes, because
      they might be useful to leverage that.
      
      Reported-by: Michael Paquier
      Author: James Coleman
      Reviewed-by: Tomas Vondra
      Discussion: https://postgr.es/m/20200414065336.GI1492@paquier.xyz
      c4427226
    • Tom Lane's avatar
      Update oidjoins regression test for v13. · 6c298881
      Tom Lane authored
      We seem to have forgotten to do this in the v12 cycle, so add it as
      a task in the RELEASE_CHANGES list, in hopes we won't forget again.
      
      While here, fix findoidjoins.c so that it actually works in the
      new dispensation where OID is a regular column, and change it to only
      consider system relations (this avoids being fooled by the OID column
      in the brintest test table).
      
      Also tweak the largeobject test so that the somewhat-recently-added
      manual creation of a LO with an OID in the system range doesn't
      fool findoidjoins.c.  For the moment I just made that use an unused
      OID, but we might have to find a more robust solution someday.
      6c298881
  2. 08 May, 2020 8 commits
  3. 07 May, 2020 6 commits
    • Peter Geoghegan's avatar
      Refactor nbtree deletion INCOMPLETE_SPLIT check. · cd8c73a3
      Peter Geoghegan authored
      Factor out code common to _bt_lock_branch_parent() and _bt_pagedel()
      into a new utility function.  This new function is used to check that
      the left sibling of a deletion target page does not have the
      INCOMPLETE_SPLIT page flag set.  If it is set then deletion is unsafe;
      there won't be a usable pivot tuple (with a downlink) in the parent page
      that points to the deletion target page.  The page deletion algorithm is
      not prepared to deal with that.  Also restructure an existing, related
      utility function that checks if the right sibling of the target page has
      the ISHALFDEAD page flag set.
      
      This organization highlights the symmetry between the two cases.  The
      goal is to make the design of page deletion clearer.  Both functions
      involve a sibling page with a flag that indicates that there was an
      interrupted operation (a page split or a page deletion) that resulted in
      a page pointed to by sibling pages, but not pointed to in the parent.
      And, both functions indicate if page deletion is unsafe due to the
      absence of a particular downlink in the parent page.
      cd8c73a3
    • Tom Lane's avatar
      Fix YA text phrase search bug. · db89f0e3
      Tom Lane authored
      checkcondition_str() failed to report multiple matches for a prefix
      pattern correctly: it would dutifully merge the match positions, but
      then after exiting that loop, if the last prefix-matching word had
      had no suitable positions, it would report there were no matches.
      The upshot would be failing to recognize a match that the query
      should match.
      
      It looks like you need all of these conditions to see the bug:
      * a phrase search (else we don't ask for match position details)
      * a prefix search item (else we don't get to this code)
      * a weight restriction (else checkclass_str won't fail)
      
      Noted while investigating a problem report from Pavel Borisov,
      though this is distinct from the issue he was on about.
      
      Back-patch to 9.6 where phrase search was added.
      db89f0e3
    • Tom Lane's avatar
      Doc: update remaining tables of functions/operators for new layout. · b2fd8ebe
      Tom Lane authored
      This converts the contrib documentation to the new style, and mops up
      a couple of function tables that were outside chapter 9 in the main
      docs.
      
      A few contrib modules choose not to present their functions in the
      standard tabular format.  There might be room to rethink those decisions
      now that the standard format is more friendly to verbose descriptions.
      But I have not undertaken to do that here; I just converted existing
      tables.
      b2fd8ebe
    • Bruce Momjian's avatar
      doc: PG 13 relnotes: adjust partitioning items · c265ed9b
      Bruce Momjian authored
      Reported-by: Amit Langote
      c265ed9b
    • Bruce Momjian's avatar
      db9e99da
    • Bruce Momjian's avatar
      doc: PG 13 relnotes: adjust partition items and attributions · 545a0658
      Bruce Momjian authored
      This merges three partition publication items into two.
      545a0658
  4. 06 May, 2020 6 commits
  5. 05 May, 2020 14 commits