1. 19 Apr, 2011 7 commits
  2. 18 Apr, 2011 4 commits
  3. 17 Apr, 2011 6 commits
    • Tom Lane's avatar
      Fix assorted infelicities in collation handling in psql's describe.c. · c29abc8b
      Tom Lane authored
      In \d, be more careful to print collation only if it's not the default for
      the column's data type.  Avoid assuming that the name "default" is magic.
      
      Fix \d on a composite type so that it will print per-column collations.
      It's no longer the case that a composite type cannot have modifiers.
      (In consequence, the expected outputs for composite-type regression tests
      change.)
      
      Fix \dD so that it will print collation for a domain, again only if it's
      not the same as the base type's collation.
      c29abc8b
    • Tom Lane's avatar
      Document COLLATE option in CREATE TYPE reference page. · 2d461712
      Tom Lane authored
      Curiously, it was already documented in ALTER TYPE ADD ATTRIBUTE, but
      not here.
      2d461712
    • Tom Lane's avatar
      Fix pg_dump to handle collations applied to columns of composite types. · acfa1f45
      Tom Lane authored
      CREATE TYPE and ALTER TYPE ADD ATTRIBUTE handle this, so I suppose it's
      an intended feature, but pg_dump didn't know about it.
      acfa1f45
    • Tom Lane's avatar
      Add check for matching column collations in ALTER TABLE ... INHERIT. · 49a642ab
      Tom Lane authored
      The other DDL operations that create an inheritance relationship were
      checking for collation match already, but this one got missed.
      
      Also fix comments that failed to mention collation checks.
      49a642ab
    • Tom Lane's avatar
      Support a COLLATE clause in plpgsql variable declarations. · c9473258
      Tom Lane authored
      This allows the usual rules for assigning a collation to a local variable
      to be overridden.  Per discussion, it seems appropriate to support this
      rather than forcing all local variables to have the argument-derived
      collation.
      c9473258
    • Tom Lane's avatar
      foreach() and list_delete() don't mix. · 88dc6fa7
      Tom Lane authored
      Fix crash when releasing duplicate entries in the encoding conversion cache
      list, caused by releasing the current entry of the list being chased by
      foreach().  We have a standard idiom for handling such cases, but this
      loop wasn't using it.
      
      This got broken in my recent rewrite of GUC assign hooks.  Not sure how
      I missed this when testing the modified code, but I did.  Per report from
      Peter.
      88dc6fa7
  4. 16 Apr, 2011 5 commits
    • Tom Lane's avatar
      Add an Assert that indexam.c isn't used on an index awaiting reindexing. · d2f60a3a
      Tom Lane authored
      This might have caught the recent embarrassment over trying to modify
      pg_index while its indexes were being rebuilt.
      
      Noah Misch
      d2f60a3a
    • Tom Lane's avatar
      Simplify reindex_relation's API. · 2d3320d3
      Tom Lane authored
      For what seem entirely historical reasons, a bitmask "flags" argument was
      recently added to reindex_relation without subsuming its existing boolean
      argument into that bitmask.  This seems a bit bizarre, so fold them
      together.
      2d3320d3
    • Tom Lane's avatar
      Clean up collation processing in prepunion.c. · 121f49a0
      Tom Lane authored
      This area was a few bricks shy of a load, and badly under-commented too.
      We have to ensure that the generated targetlist entries for a set-operation
      node expose the correct collation for each entry, since higher-level
      processing expects the tlist to reflect the true ordering of the plan's
      output.
      
      This hackery wouldn't be necessary if SortGroupClause carried collation
      info ... but making it do so would inject more pain in the parser than
      would be saved here.  Still, we might want to rethink that sometime.
      121f49a0
    • Peter Eisentraut's avatar
      Set client encoding explicitly in plpython_unicode test · 5809a645
      Peter Eisentraut authored
      This will (hopefully) eliminate the need for the
      plpython_unicode_0.out expected file.
      5809a645
    • Tom Lane's avatar
      Prevent incorrect updates of pg_index while reindexing pg_index itself. · 4b6106cc
      Tom Lane authored
      The places that attempt to change pg_index.indcheckxmin during a reindexing
      operation cannot be executed safely if pg_index itself is the subject of
      the operation.  This is the explanation for a couple of recent reports of
      VACUUM FULL failing with
      	ERROR:  duplicate key value violates unique constraint "pg_index_indexrelid_index"
      	DETAIL:  Key (indexrelid)=(2678) already exists.
      
      However, there isn't any real need to update indcheckxmin in such a
      situation, if we assume that pg_index can never contain a truly broken HOT
      chain.  This assumption holds if new indexes are never created on it during
      concurrent operations, which is something we don't consider safe for any
      system catalog, not just pg_index.  Accordingly, modify the code to not
      manipulate indcheckxmin when reindexing any system catalog.
      
      Back-patch to 8.3, where HOT was introduced.  The known failure scenarios
      involve 9.0-style VACUUM FULL, so there might not be any real risk before
      9.0, but let's not assume that.
      4b6106cc
  5. 15 Apr, 2011 8 commits
  6. 14 Apr, 2011 4 commits
    • Tom Lane's avatar
    • Robert Haas's avatar
      Advise Debian/Ubuntu users to use openjade1.3. · 07e58cbe
      Robert Haas authored
      The latest openjade packages for Ubuntu 10.10 seg fault when building
      our documentation.
      
      Josh Berkus
      07e58cbe
    • Robert Haas's avatar
      Remove obsolete comment. · 0c80b57d
      Robert Haas authored
      The lock level for adding a parent table is now ShareUpdateExclusiveLock;
      see commit fbcf4b92.  This comment didn't
      get updated to match, but it doesn't seem important to mention this detail
      here, so rather than updating it now, just take it out.
      0c80b57d
    • Robert Haas's avatar
      Fix toast table creation. · 39a68e5c
      Robert Haas authored
      Instead of using slightly-too-clever heuristics to decide when we must
      create a TOAST table, just check whether one is needed every time the
      table is altered.  Checking whether a toast table is needed is cheap
      enough that we needn't worry about doing it on every ALTER TABLE command,
      and the previous coding is apparently prone to accidental breakage:
      commit 04e17bae broken ALTER TABLE ..
      SET STORAGE, which moved some actions from AT_PASS_COL_ATTRS to
      AT_PASS_MISC, and commit 6c572399 broke
      ALTER TABLE .. ADD COLUMN by changing the way that adding columns
      recurses into child tables.
      
      Noah Misch, with one comment change by me
      39a68e5c
  7. 13 Apr, 2011 6 commits
    • Tom Lane's avatar
      Ensure mark_dummy_rel doesn't create dangling pointers in RelOptInfos. · eca75a12
      Tom Lane authored
      When we are doing GEQO join planning, the current memory context is a
      short-lived context that will be reset at the end of geqo_eval().  However,
      the RelOptInfos for base relations are set up before that and then re-used
      across many GEQO cycles.  Hence, any code that modifies a baserel during
      join planning has to be careful not to put pointers to the short-lived
      context into the baserel struct.  mark_dummy_rel got this wrong, leading to
      easy-to-reproduce-once-you-know-how crashes in 8.4, as reported off-list by
      Leo Carson of SDSC.  Some improvements made in 9.0 make it difficult to
      demonstrate the crash in 9.0 or HEAD; but there's no doubt that there's
      still a risk factor here, so patch all branches that have the function.
      (Note: 8.3 has a similar function, but it's only applied to joinrels and
      thus is not a hazard.)
      eca75a12
    • Tom Lane's avatar
      Update time zone data files to tzdata release 2011f. · 170aeb54
      Tom Lane authored
      DST law changes in Chile, Cuba, Falkland Islands, Morocco, Samoa, Turkey.
      Historical corrections for South Australia, Alaska, Hawaii.
      170aeb54
    • Robert Haas's avatar
      0a49c95c
    • Heikki Linnakangas's avatar
      On HP/UX, the structs used by ioctl(SIOCGLIFCONF) are named differently · 40e64017
      Heikki Linnakangas authored
      than on other platforms, and only IPv6 addresses are returned. Because of
      those two issues, fall back to ioctl(SIOCGIFCONF) on HP/UX, so that it at
      least compiles and finds IPv4 addresses. This function is currently only
      used for interpreting samehost/samenet in pg_hba.conf, which isn't that
      critical.
      40e64017
    • Heikki Linnakangas's avatar
      Revert the patch to check if we've reached end-of-backup also when doing · 54685b1c
      Heikki Linnakangas authored
      crash recovery, and throw an error if not. hubert depesz lubaczewski pointed
      out that that situation also happens in the crash recovery following a
      system crash that happens during an online backup.
      
      We might want to do something smarter in 9.1, like put the check back for
      backups taken with pg_basebackup, but that's for another patch.
      54685b1c
    • Heikki Linnakangas's avatar
      On IA64 architecture, we check the depth of the register stack in addition · b5bb040d
      Heikki Linnakangas authored
      to the regular stack. The code to do that is platform and compiler specific,
      add support for the HP-UX native compiler.
      b5bb040d