1. 09 Nov, 2011 6 commits
    • Peter Eisentraut's avatar
      Clean gettext-files file in clean target · 3ad2c8e1
      Peter Eisentraut authored
      It used to be cleaned in maintainer-clean, but that is inconsistent
      with other cleaning of NLS files in nls-global.mk, and it's also wrong
      overall, because it's not part of the distribution tarball, which is
      the base definition of the maintainer-clean target.
      3ad2c8e1
    • Robert Haas's avatar
      Fix compiler warning. · 452d1d19
      Robert Haas authored
      452d1d19
    • Heikki Linnakangas's avatar
      In COPY, insert tuples to the heap in batches. · d326d9e8
      Heikki Linnakangas authored
      This greatly reduces the WAL volume, especially when the table is narrow.
      The overhead of locking the heap page is also reduced. Reduced WAL traffic
      also makes it scale a lot better, if you run multiple COPY processes at
      the same time.
      d326d9e8
    • Tom Lane's avatar
      Tweak new regression test case for more portability. · 2c30f961
      Tom Lane authored
      Ensure that same index gets selected on 32-bit and 64-bit machines.
      Per buildfarm results.
      2c30f961
    • Tom Lane's avatar
      Fix random discrepancies between parallel_schedule and serial_schedule. · 6d295b64
      Tom Lane authored
      In particular, my previous patch expected the create_index test to run
      before the inherit test; but this was only true in the serial schedule.
      Rearrange this portion of the schedules to be more consistent.
      
      Per buildfarm results.
      6d295b64
    • Tom Lane's avatar
      Wrap appendrel member outputs in PlaceHolderVars in additional cases. · 57664ed2
      Tom Lane authored
      Add PlaceHolderVar wrappers as needed to make UNION ALL sub-select output
      expressions appear non-constant and distinct from each other.  This makes
      the world safe for add_child_rel_equivalences to do what it does.  Before,
      it was possible for that function to add identical expressions to different
      EquivalenceClasses, which logically should imply merging such ECs, which
      would be wrong; or to improperly add a constant to an EquivalenceClass,
      drastically changing its behavior.  Per report from Teodor Sigaev.
      
      The only currently known consequence of this bug is "MergeAppend child's
      targetlist doesn't match MergeAppend" planner failures in 9.1 and later.
      I am suspicious that there may be other failure modes that could affect
      older release branches; but in the absence of any hard evidence, I'll
      refrain from back-patching further than 9.1.
      57664ed2
  2. 08 Nov, 2011 7 commits
  3. 07 Nov, 2011 4 commits
  4. 06 Nov, 2011 2 commits
  5. 05 Nov, 2011 4 commits
    • Magnus Hagander's avatar
      Update regression tests for \d+ modification · 3a6e4076
      Magnus Hagander authored
      Noted by Tom
      3a6e4076
    • Magnus Hagander's avatar
      ebcadba2
    • Magnus Hagander's avatar
    • Tom Lane's avatar
      Don't assume that a tuple's header size is unchanged during toasting. · 039680af
      Tom Lane authored
      This assumption can be wrong when the toaster is passed a raw on-disk
      tuple, because the tuple might pre-date an ALTER TABLE ADD COLUMN operation
      that added columns without rewriting the table.  In such a case the tuple's
      natts value is smaller than what we expect from the tuple descriptor, and
      so its t_hoff value could be smaller too.  In fact, the tuple might not
      have a null bitmap at all, and yet our current opinion of it is that it
      contains some trailing nulls.
      
      In such a situation, toast_insert_or_update did the wrong thing, because
      to save a few lines of code it would use the old t_hoff value as the offset
      where heap_fill_tuple should start filling data.  This did not leave enough
      room for the new nulls bitmap, with the result that the first few bytes of
      data could be overwritten with null flag bits, as in a recent report from
      Hubert Depesz Lubaczewski.
      
      The particular case reported requires ALTER TABLE ADD COLUMN followed by
      CREATE TABLE AS SELECT * FROM ... or INSERT ... SELECT * FROM ..., and
      further requires that there be some out-of-line toasted fields in one of
      the tuples to be copied; else we'll not reach the troublesome code.
      The problem can only manifest in this form in 8.4 and later, because
      before commit a77eaa6a, CREATE TABLE AS or
      INSERT/SELECT wouldn't result in raw disk tuples getting passed directly
      to heap_insert --- there would always have been at least a junkfilter in
      between, and that would reconstitute the tuple header with an up-to-date
      t_natts and hence t_hoff.  But I'm backpatching the tuptoaster change all
      the way anyway, because I'm not convinced there are no older code paths
      that present a similar risk.
      039680af
  6. 04 Nov, 2011 7 commits
  7. 03 Nov, 2011 10 commits