1. 05 5月, 2011 1 次提交
  2. 03 5月, 2011 7 次提交
  3. 02 5月, 2011 3 次提交
    • P
      Catch errors in for loop in makefile · 5c436a79
      Peter Eisentraut 提交于
      Add "|| exit" so that the rule aborts when a command fails.
      5c436a79
    • P
      Rewrite installation makefile rules without for loops · b106195b
      Peter Eisentraut 提交于
      install-sh can install multiple files at once, so for loops are not
      necessary.  This was already changed for the rest of the code some
      time ago, but pgxs.mk was apparently forgotten, and the obsolete
      coding style has now been copied to the PLs as well.
      
      This also fixes the problem that the for loops in question did not
      catch errors.
      b106195b
    • T
      Make CLUSTER lock the old table's toast table before copying data. · 83b75849
      Tom Lane 提交于
      We must lock out autovacuuming of the old toast table before computing the
      OldestXmin horizon we will use.  Otherwise, autovacuum could start on the
      toast table later, compute a later OldestXmin horizon, and remove as DEAD
      toast tuples that we still need (because we think their parent tuples are
      only RECENTLY_DEAD).  Per further thought about bug #5998.
      83b75849
  4. 30 4月, 2011 2 次提交
    • B
      5a71b641
    • T
      Remove special case for xmin == xmax in HeapTupleSatisfiesVacuum(). · 44e4bbf7
      Tom Lane 提交于
      VACUUM was willing to remove a committed-dead tuple immediately if it was
      deleted by the same transaction that inserted it.  The idea is that such a
      tuple could never have been visible to any other transaction, so we don't
      need to keep it around to satisfy MVCC snapshots.  However, there was
      already an exception for tuples that are part of an update chain, and this
      exception created a problem: we might remove TOAST tuples (which are never
      part of an update chain) while their parent tuple stayed around (if it was
      part of an update chain).  This didn't pose a problem for most things,
      since the parent tuple is indeed dead: no snapshot will ever consider it
      visible.  But MVCC-safe CLUSTER had a problem, since it will try to copy
      RECENTLY_DEAD tuples to the new table.  It then has to copy their TOAST
      data too, and would fail if VACUUM had already removed the toast tuples.
      
      Easiest fix is to get rid of the special case for xmin == xmax.  This may
      delay reclaiming dead space for a little bit in some cases, but it's by far
      the most reliable way to fix the issue.
      
      Per bug #5998 from Mark Reid.  Back-patch to 8.3, which is the oldest
      version with MVCC-safe CLUSTER.
      44e4bbf7
  5. 29 4月, 2011 3 次提交
  6. 28 4月, 2011 9 次提交
    • A
      Use a macro variable PG_PRINTF_ATTRIBUTE for the style used for checking printf type functions. · c02d5b7c
      Andrew Dunstan 提交于
      The style is set to "printf" for backwards compatibility everywhere except
      on Windows, where it is set to "gnu_printf", which eliminates hundreds of
      false error messages from modern versions of gcc arising from  %m and %ll{d,u}
      formats.
      c02d5b7c
    • H
      39850c7f
    • T
      Tag 9.1beta1. · 993c5e59
      Tom Lane 提交于
      993c5e59
    • T
      Make a quick copy-editing pass over the 9.1 release notes. · bb1051eb
      Tom Lane 提交于
      Also remove the material about this being an alpha release.
      
      The notes still need a lot of work, but they're more or less presentable
      as a beta version now.
      bb1051eb
    • P
      Fix binary upgrade of altered typed tables · b2ef8929
      Peter Eisentraut 提交于
      Instead of dumping them as CREATE TABLE ... OF, dump them as normal
      tables with the usual special processing for dropped columns, and then
      attach them to the type afterward, using ALTER TABLE ... OF.  This is
      analogous to the existing handling of inherited tables.
      b2ef8929
    • A
      Revert "Force use of "%I64d" format for 64 bit ints on MinGW." · 6693fec0
      Andrew Dunstan 提交于
      This reverts commit 52d01c2f.
      
      the UINT64_FORMAT bit broke the b uildfarm, so I'm reverting the whole thing pending further investigation.
      6693fec0
    • M
      timeline is not needed in BaseBackup() · 6693eb72
      Magnus Hagander 提交于
      This code was accidentally part of the patch, it's only
      needed for the code that's for 9.2. Not needing the timeline
      also removes the need to call IDENTIFY_SYSTEM.
      
      Noted by Peter E.
      6693eb72
    • T
      Add comments about the need to avoid uninitialized bits in datatype values. · 4f6c75b5
      Tom Lane 提交于
      There was already one recommendation in the documentation about writing
      C functions to ensure padding bytes are zeroes, but make it stronger.
      
      Also fix an example that was still using direct assignment to a varlena
      length word, which no longer works since the varvarlena changes.
      4f6c75b5
    • T
      Fix array- and path-creating functions to ensure padding bytes are zeroes. · 18c0b4ec
      Tom Lane 提交于
      Per recent discussion, it's important for all computed datums (not only the
      results of input functions) to not contain any ill-defined (uninitialized)
      bits.  Failing to ensure that can result in equal() reporting that
      semantically indistinguishable Consts are not equal, which in turn leads to
      bizarre and undesirable planner behavior, such as in a recent example from
      David Johnston.  We might eventually try to fix this in a general manner by
      allowing datatypes to define identity-testing functions, but for now the
      path of least resistance is to expect datatypes to force all unused bits
      into consistent states.
      
      Per some testing by Noah Misch, array and path functions seem to be the
      only ones presenting risks at the moment, so I looked through all the
      functions in adt/array*.c and geo_ops.c and fixed them as necessary.  In
      the array functions, the easiest/safest fix is to allocate result arrays
      with palloc0 instead of palloc.  Possibly in future someone will want to
      look into whether we can just zero the padding bytes, but that looks too
      complex for a back-patchable fix.  In the path functions, we already had a
      precedent in path_in for just zeroing the one known pad field, so duplicate
      that code as needed.
      
      Back-patch to all supported branches.
      18c0b4ec
  7. 27 4月, 2011 8 次提交
  8. 26 4月, 2011 7 次提交
    • B
    • B
      Now that pg_upgrade uses -w in pg_ctl, remove loop that retried testing · 6c4d2bd9
      Bruce Momjian 提交于
      the connection;  also restructure the libpq connection code.
      
      This patch also removes the unused variable postmasterPID and fixes a
      libpq structure leak that was in the testing loop.
      6c4d2bd9
    • B
      In pg_upgrade, avoid one start/stop of the postmaster; use the -w · 44091442
      Bruce Momjian 提交于
      (wait) flag for pg_ctl start/stop;  remove the unused "quiet" flag in
      the functions for starting/stopping the postmaster.
      44091442
    • T
      Remove incorrect HINT for use of ALTER FOREIGN TABLE on the wrong relkind. · 6dab96ab
      Tom Lane 提交于
      Per discussion, removing the hint seems better than correcting it because
      the adjacent analogous cases in RenameRelation don't have any hints, and
      nobody seems to have missed 'em.
      
      Shigeru Hanada
      6dab96ab
    • R
      Refactor broken CREATE TABLE IF NOT EXISTS support. · 68ef051f
      Robert Haas 提交于
      Per bug #5988, reported by Marko Tiikkaja, and further analyzed by Tom
      Lane, the previous coding was broken in several respects: even if the
      target table already existed, a subsequent CREATE TABLE IF NOT EXISTS
      might try to add additional constraints or sequences-for-serial
      specified in the new CREATE TABLE statement.
      
      In passing, this also fixes a minor information leak: it's no longer
      possible to figure out whether a schema to which you don't have CREATE
      access contains a sequence named like "x_y_seq" by attempting to create a
      table in that schema called "x" with a serial column called "y".
      
      Some more refactoring of this code in the future might be warranted,
      but that will need to wait for a later major release.
      68ef051f
    • R
      Remove partial and undocumented GRANT .. FOREIGN TABLE support. · be90032e
      Robert Haas 提交于
      Instead, foreign tables are treated just like views: permissions can
      be granted using GRANT privilege ON [TABLE] foreign_table_name TO role,
      and revoked similarly.  GRANT/REVOKE .. FOREIGN TABLE is no longer
      supported, just as we don't support GRANT/REVOKE .. VIEW.  The set of
      accepted permissions for foreign tables is now identical to the set for
      regular tables, and views.
      
      Per report from Thom Brown, and subsequent discussion.
      be90032e
    • T
      Fix pg_size_pretty() to avoid overflow for inputs close to INT64_MAX. · af0f2009
      Tom Lane 提交于
      The expression that tried to round the value to the nearest TB could
      overflow, leading to bogus output as reported in bug #5993 from Nicola
      Cossu.  This isn't likely to ever happen in the intended usage of the
      function (if it could, we'd be needing to use a wider datatype instead);
      but it's not hard to give the expected output, so let's do so.
      af0f2009