1. 26 Apr, 2018 6 commits
  2. 25 Apr, 2018 9 commits
  3. 24 Apr, 2018 1 commit
  4. 23 Apr, 2018 11 commits
  5. 22 Apr, 2018 1 commit
  6. 21 Apr, 2018 2 commits
  7. 20 Apr, 2018 6 commits
    • Tom Lane's avatar
      Test conversion of NaN between float4 and float8. · 55e0e458
      Tom Lane authored
      Results from buildfarm member opossum suggest that this doesn't work
      quite right on that platform.  We've seen issues with NaN support on
      MIPS/NetBSD before ... allegedly they fixed this stuff back in 2010,
      but maybe only for small values of "fixed".
      
      If, in fact, opossum fails this test then I plan to revert it;
      it's mainly for diagnostic purposes rather than something we'd
      necessarily keep long-term.  I think that the failures in window.sql
      could be worked around with some code duplication, but I want to
      verify my theory about the cause first.
      55e0e458
    • Stephen Frost's avatar
      Fix a couple minor typos · a0fefbcb
      Stephen Frost authored
      In commit f0e44751, GetIndexOpClass was renamed to ResolveOpClass, but
      the comment in typecmds.c didn't get the memo.
      
      In objectaddress.c, missing 'of' in a comment.
      
      Both noticed by Vik Fearing, patch is mine though.
      a0fefbcb
    • Tom Lane's avatar
      Don't run fast_default regression test in parallel with other tests. · 676858bc
      Tom Lane authored
      Since it sets up an event trigger that would fire on DDL done by any
      concurrent test script, the original scheduling is just an invitation
      to irreproducible test failures.  (The fact that we found a bug through
      exactly such irreproducible test failures doesn't really change the
      calculus here: this script is a hazard to anything that runs in parallel
      with it today or might be added to that parallel group in future.  No,
      I don't believe that the trigger is protecting itself sufficiently to
      avoid all possible trouble.)
      
      Discussion: https://postgr.es/m/5767.1523995174@sss.pgh.pa.us
      676858bc
    • Tom Lane's avatar
      Fix race conditions when an event trigger is added concurrently with DDL. · b1b71f16
      Tom Lane authored
      EventTriggerTableRewrite crashed if there were table_rewrite triggers
      present, but there had not been when the calling command started.
      
      EventTriggerDDLCommandEnd called ddl_command_end triggers if present,
      even if there had been no such triggers when the calling command started,
      which would lead to a failure in pg_event_trigger_ddl_commands.
      
      In both cases, fix by doing nothing; it's better to wait till the next
      command when things will be properly initialized.
      
      In passing, remove an elog(DEBUG1) call that might have seemed interesting
      four years ago but surely isn't today.
      
      We found this because of intermittent failures in the buildfarm.  Thanks
      to Alvaro Herrera and Andrew Gierth for analysis.
      
      Back-patch to 9.5; some of this code exists before that, but the specific
      hazards we need to guard against don't.
      
      Discussion: https://postgr.es/m/5767.1523995174@sss.pgh.pa.us
      b1b71f16
    • Tom Lane's avatar
    • Tom Lane's avatar
      Change more places to be less trusting of RestrictInfo.is_pushed_down. · c792c7db
      Tom Lane authored
      On further reflection, commit e5d83995 didn't go far enough: pretty much
      everywhere in the planner that examines a clause's is_pushed_down flag
      ought to be changed to use the more complicated behavior where we also
      check the clause's required_relids.  Otherwise we could make incorrect
      decisions about whether, say, a clause is safe to use as a hash clause.
      
      Some (many?) of these places are safe as-is, either because they are
      never reached while considering a parameterized path, or because there
      are additional checks that would reject a pushed-down clause anyway.
      However, it seems smarter to just code them all the same way rather
      than rely on easily-broken reasoning of that sort.
      
      In support of that, invent a new macro RINFO_IS_PUSHED_DOWN that should
      be used in place of direct tests on the is_pushed_down flag.
      
      Like the previous patch, back-patch to all supported branches.
      
      Discussion: https://postgr.es/m/f8128b11-c5bf-3539-48cd-234178b2314d@proxel.se
      c792c7db
  8. 19 Apr, 2018 4 commits
    • Tom Lane's avatar
      Improve consistency of comments in system catalog headers. · 68c23cba
      Tom Lane authored
      Use the term "system catalog" rather than "system relation" in assorted
      places where it's clearly referring to a table rather than, say, an
      index.  Use more natural word order in the header boilerplate, improve
      some of the one-liner catalog descriptions, and fix assorted random
      deviations from the normal boilerplate.  All purely neatnik-ism, but
      why not.
      
      John Naylor, some additional cleanup by me
      
      Discussion: https://postgr.es/m/CAJVSVGUeJmFB3h-NJ18P32NPa+kzC165nm7GSoGHfPaN80Wxcw@mail.gmail.com
      68c23cba
    • Tom Lane's avatar
      Fix incorrect handling of join clauses pushed into parameterized paths. · e5d83995
      Tom Lane authored
      In some cases a clause attached to an outer join can be pushed down into
      the outer join's RHS even though the clause is not degenerate --- this
      can happen if we choose to make a parameterized path for the RHS.  If
      the clause ends up attached to a lower outer join, we'd misclassify it
      as being a "join filter" not a plain "filter" condition at that node,
      leading to wrong query results.
      
      To fix, teach extract_actual_join_clauses to examine each join clause's
      required_relids, not just its is_pushed_down flag.  (The latter now
      seems vestigial, or at least in need of rethinking, but we won't do
      anything so invasive as redefining it in a bug-fix patch.)
      
      This has been wrong since we introduced parameterized paths in 9.2,
      though it's evidently hard to hit given the lack of previous reports.
      The test case used here involves a lateral function call, and I think
      that a lateral reference may be required to get the planner to select
      a broken plan; though I wouldn't swear to that.  In any case, even if
      LATERAL is needed to trigger the bug, it still affects all supported
      branches, so back-patch to all.
      
      Per report from Andreas Karlsson.  Thanks to Andrew Gierth for
      preliminary investigation.
      
      Discussion: https://postgr.es/m/f8128b11-c5bf-3539-48cd-234178b2314d@proxel.se
      e5d83995
    • Alvaro Herrera's avatar
      Remove quick path in ExecInitPartitionInfo for equal tupdescs · 79b2e526
      Alvaro Herrera authored
      I added this "optimization" on top of Amit Langote's 158b7bc6, but
      the quick path is never taken because the partition uses a different
      pg_type oid than its parent table (causing equalTupleDescs to return
      false).  Changing that requires more analysis and is too considered
      dangerous at this point in the cycle, so revert it.
      
      We might make it work someday, but not for pg11.
      
      Discussion: https://postgr.es/m/825031be-942c-8c24-6163-13c27f217a3d@lab.ntt.co.jp
      79b2e526
    • Alvaro Herrera's avatar
      Plural of modulus is moduli · 2d625176
      Alvaro Herrera authored
      2d625176