1. 07 Nov, 2018 1 commit
    • Tom Lane's avatar
      Postpone calculating total_table_pages until after pruning/exclusion. · c6e4133f
      Tom Lane authored
      The planner doesn't make any use of root->total_table_pages until it
      estimates costs of indexscans, so we don't need to compute it as
      early as that's currently done.  By doing the calculation between
      set_base_rel_sizes and set_base_rel_pathlists, we can omit relations
      that get removed from the query by partition pruning or constraint
      exclusion, which seems like a more accurate basis for costing.
      
      (Historical note: I think at the time this code was written, there
      was not a separation between the "set sizes" and "set pathlists"
      steps, so that this approach would have been impossible at the time.
      But now that we have that separation, this is clearly the better way
      to do things.)
      
      David Rowley, reviewed by Edmund Horner
      
      Discussion: https://postgr.es/m/CAKJS1f-NG1mRM0VOtkAG7=ZLQWihoqees9R4ki3CKBB0-fRfCA@mail.gmail.com
      c6e4133f
  2. 06 Nov, 2018 13 commits
  3. 05 Nov, 2018 6 commits
  4. 04 Nov, 2018 4 commits
  5. 03 Nov, 2018 6 commits
    • Andres Freund's avatar
      Prevent generating EEOP_AGG_STRICT_INPUT_CHECK operations when nargs == 0. · 793beab3
      Andres Freund authored
      This only became a problem with 4c640f4f, which didn't synchronize
      the value agg_strict_input_check.nargs is set to, with the guard
      condition for emitting the operation.
      
      Besides such instructions being unnecessary overhead, currently the
      LLVM JIT provider doesn't support them. It seems more sensible to
      avoid generating such instruction than supporting them. Add assertions
      to make it easier to debug a potential further occurance.
      
      Discussion: https://postgr.es/m/2a505161-2727-2473-7c46-591ed108ac52@email.cz
      Backpatch: 11-, like 4c640f4f.
      793beab3
    • Andres Freund's avatar
      Fix STRICT check for strict aggregates with NULL ORDER BY columns. · 4c640f4f
      Andres Freund authored
      I (Andres) broke this unintentionally in 69c3936a, by checking
      strictness for all input expressions computed for an aggregate, rather
      than just the input for the aggregate transition function.
      
      Reported-By: Ondřej Bouda
      Bisected-By: Tom Lane
      Diagnosed-By: Andrew Gierth
      Discussion: https://postgr.es/m/2a505161-2727-2473-7c46-591ed108ac52@email.cz
      Backpatch: 11-, like 69c3936a
      4c640f4f
    • Tom Lane's avatar
      Make ts_locale.c's character-type functions cope with UTF-16. · 981dc2ba
      Tom Lane authored
      On Windows, in UTF8 database encoding, what char2wchar() produces is
      UTF16 not UTF32, ie, characters above U+FFFF will be represented by
      surrogate pairs.  t_isdigit() and siblings did not account for this
      and failed to provide a large enough result buffer.  That in turn
      led to bogus "invalid multibyte character for locale" errors, because
      contrary to what you might think from char2wchar()'s documentation,
      its Windows code path doesn't cope sanely with buffer overflow.
      
      The solution for t_isdigit() and siblings is pretty clear: provide
      a 3-wchar_t result buffer not 2.
      
      char2wchar() also needs some work to provide more consistent, and more
      accurately documented, buffer overrun behavior.  But that's a bigger job
      and it doesn't actually have any immediate payoff, so leave it for later.
      
      Per bug #15476 from Kenji Uno, who deserves credit for identifying the
      cause of the problem.  Back-patch to all active branches.
      
      Discussion: https://postgr.es/m/15476-4314f480acf0f114@postgresql.org
      981dc2ba
    • Alvaro Herrera's avatar
      Fix tablespace handling for partitioned indexes · dfa60814
      Alvaro Herrera authored
      When creating partitioned indexes, the tablespace was not being saved
      for the parent index. This meant that subsequently created partitions
      would not use the right tablespace for their indexes.
      
      ALTER INDEX SET TABLESPACE and ALTER INDEX ALL IN TABLESPACE raised
      errors when tried; fix them too.  This requires bespoke code for
      ATExecCmd() that applies to the special case when the tablespace move is
      just a catalog change.
      
      Discussion: https://postgr.es/m/20181102003138.uxpaca6qfxzskepi@alvherre.pgsql
      dfa60814
    • Stephen Frost's avatar
      Remove extra word from create sub docs · ceadcbe8
      Stephen Frost authored
      Improve the documentation in the CREATE SUBSCRIPTION command a bit by
      removing an extraneous word and spelling out 'information'.
      ceadcbe8
    • Tom Lane's avatar
      First-draft release notes for 11.1. · 65a82a76
      Tom Lane authored
      As usual, the release notes for other branches will be made by cutting
      these down, but put them up for community review first.  Note that a
      fair percentage of the entries apply only to prior branches because
      their issue was already fixed in 11.0.
      65a82a76
  6. 02 Nov, 2018 7 commits
  7. 01 Nov, 2018 3 commits