1. 23 4月, 2011 4 次提交
    • T
      De-kludge contrib/btree_gin for collations. · 474ff212
      Tom Lane 提交于
      Using DEFAULT_COLLATION_OID in the comparePartial functions was not only
      a lame hack, but outright wrong, because the compare functions for
      collation-aware types were already responding to the declared index
      collation.  So comparePartial would have the wrong expectation about
      the index's sort order, possibly leading to missing matches for prefix
      searches.
      474ff212
    • P
      Small update to emacs example configuration · 78e7e20a
      Peter Eisentraut 提交于
      Since both tarballs and git now result in a "postgresql" directory
      rather than a "pgsql" directory, adjust the example configuration to
      look for the former.
      78e7e20a
    • P
      Add fill-column setting to emacs example configurations · 415f5e12
      Peter Eisentraut 提交于
      This matches the maximum line length that pgindent uses.
      415f5e12
    • T
      Make a code-cleanup pass over the collations patch. · 9e9b9ac7
      Tom Lane 提交于
      This patch is almost entirely cosmetic --- mostly cleaning up a lot of
      neglected comments, and fixing code layout problems in places where the
      patch made lines too long and then pgindent did weird things with that.
      I did find a bug-of-omission in equalTupleDescs().
      9e9b9ac7
  2. 22 4月, 2011 2 次提交
  3. 21 4月, 2011 8 次提交
    • R
      Allow ALTER TYPE .. ADD ATTRIBUTE .. CASCADE to recurse to descendants. · a0e8df52
      Robert Haas 提交于
      Without this, adding an attribute to a typed table with an inheritance
      child fails, which is surprising.
      
      Noah Misch, with minor changes by me.
      a0e8df52
    • R
      Fix use of incorrect constant RemoveRoleFromObjectACL. · 8ede4279
      Robert Haas 提交于
      This could cause failures when DROP OWNED BY attempt to remove default
      privileges on sequences.  Back-patching to 9.0.
      
      Shigeru Hanada
      8ede4279
    • R
      Typo fix. · 0babcdf6
      Robert Haas 提交于
      0babcdf6
    • R
      Allow ALTER TABLE name {OF type | NOT OF}. · 68739ba8
      Robert Haas 提交于
      This syntax allows a standalone table to be made into a typed table,
      or a typed table to be made standalone.  This is possibly a mildly
      useful feature in its own right, but the real motivation for this
      change is that we need it to make pg_upgrade work with typed tables.
      This doesn't actually fix that problem, but it's necessary
      infrastructure.
      
      Noah Misch
      68739ba8
    • T
      Fix bugs in indexing of in-doubt HOT-updated tuples. · 520bcd9c
      Tom Lane 提交于
      If we find a DELETE_IN_PROGRESS HOT-updated tuple, it is impossible to know
      whether to index it or not except by waiting to see if the deleting
      transaction commits.  If it doesn't, the tuple might again be LIVE, meaning
      we have to index it.  So wait and recheck in that case.
      
      Also, we must not rely on ii_BrokenHotChain to decide that it's possible to
      omit tuples from the index.  That could result in omitting tuples that we
      need, particularly in view of yesterday's fixes to not necessarily set
      indcheckxmin (but it's broken even without that, as per my analysis today).
      Since this is just an extremely marginal performance optimization, dropping
      the test shouldn't hurt.
      
      These cases are only expected to happen in system catalogs (they're
      possible there due to early release of RowExclusiveLock in most
      catalog-update code paths).  Since reindexing of a system catalog isn't a
      particularly performance-critical operation anyway, there's no real need to
      be concerned about possible performance degradation from these changes.
      
      The worst aspects of this bug were introduced in 9.0 --- 8.x will always
      wait out a DELETE_IN_PROGRESS tuple.  But I think dropping index entries
      on the strength of ii_BrokenHotChain is dangerous even without that, so
      back-patch removal of that optimization to 8.3 and 8.4.
      520bcd9c
    • T
      Set indcheckxmin true when REINDEX fixes an invalid or not-ready index. · 9ad7e155
      Tom Lane 提交于
      Per comment from Greg Stark, it's less clear that HOT chains don't conflict
      with the index than it would be for a valid index.  So, let's preserve the
      former behavior that indcheckxmin does get set when there are
      potentially-broken HOT chains in this case.  This change does not cause any
      pg_index update that wouldn't have happened anyway, so we're not
      re-introducing the previous bug with pg_index updates, and surely the case
      is not significant from a performance standpoint; so let's be as
      conservative as possible.
      9ad7e155
    • T
      Make plan_cluster_use_sort cope with no IndexOptInfo for the target index. · 5b8e4429
      Tom Lane 提交于
      The original coding assumed that such a case represents caller error, but
      actually get_relation_info will omit generating an IndexOptInfo for any
      index it thinks is unsafe to use.  Therefore, handle this case by returning
      "true" to indicate that a seqscan-and-sort is the preferred way to
      implement the CLUSTER operation.  New bug in 9.1, no backpatch needed.
      Per bug #5985 from Daniel Grace.
      5b8e4429
    • P
      Fix PL/Python traceback for error in separate file · 395fcac2
      Peter Eisentraut 提交于
      It assumed that the lineno from the traceback always refers to the
      PL/Python function.  If you created a PL/Python function that imports
      some code, runs it, and that code raises an exception, PLy_traceback
      would get utterly confused.
      
      Now we look at the file name reported with the traceback and only
      print the source line if it came from the PL/Python function.
      
      Jan Urbański
      395fcac2
  4. 20 4月, 2011 12 次提交
    • B
      Pg_upgrade C comment addition. · 0262251c
      Bruce Momjian 提交于
      Document why we do the missing new database check during the check
      phase.
      0262251c
    • H
      Quotes in strings injected into bki file need to escaped. In particular, · 2b919118
      Heikki Linnakangas 提交于
      "People's Republic of China" locale on Windows was causing initdb to fail.
      
      This fixes bug #5818 reported by yulei. On master, this makes the mapping
      of "People's Republic of China" to just "China" obsolete. In 9.0 and 8.4,
      just fix the escaping. Earlier versions didn't have locale names in bki
      file.
      2b919118
    • B
      Throw error for mismatched pg_upgrade clusters · 7228d029
      Bruce Momjian 提交于
      If someone removes the 'postgres' database from the old cluster and the
      new cluster has a 'postgres' database, the number of databases will not
      match.  We actually could upgrade such a setup, but it would violate the
      1-to-1 mapping of database counts, so we throw an error instead.
      
      Previously they got an error during the upgrade, and not at the check
      stage; PG 9.0.4 does the same.
      7228d029
    • B
      Add C comment · 03419447
      Bruce Momjian 提交于
      Add C comment about why we throw an error if the pg_upgrade old/new
      database counts don't match.
      03419447
    • T
      Avoid changing an index's indcheckxmin horizon during REINDEX. · 8c19977e
      Tom Lane 提交于
      There can never be a need to push the indcheckxmin horizon forward, since
      any HOT chains that are actually broken with respect to the index must
      pre-date its original creation.  So we can just avoid changing pg_index
      altogether during a REINDEX operation.
      
      This offers a cleaner solution than my previous patch for the problem
      found a few days ago that we mustn't try to update pg_index while we are
      reindexing it.  System catalog indexes will always be created with
      indcheckxmin = false during initdb, and with this modified code we should
      never try to change their pg_index entries.  This avoids special-casing
      system catalogs as the former patch did, and should provide a performance
      benefit for many cases where REINDEX formerly caused an index to be
      considered unusable for a short time.
      
      Back-patch to 8.3 to cover all versions containing HOT.  Note that this
      patch changes the API for index_build(), but I believe it is unlikely that
      any add-on code is calling that directly.
      8c19977e
    • T
      Revert "Prevent incorrect updates of pg_index while reindexing pg_index itself." · c096d19b
      Tom Lane 提交于
      This reverts commit 4b6106cc of 2011-04-15.
      There's a better way to do it, which will follow shortly.
      c096d19b
    • P
      Refix the unaccent regression test on MSVC properly · 385942f4
      Peter Eisentraut 提交于
      ... for some value of "properly".  Instead of overriding REGRESS_OPTS,
      set the variables ENCODING and NO_LOCALE, which is more expressive and
      allows overriding by the user.  Fix vcregress.pl to handle that.
      385942f4
    • P
      Treat config.pl as optional in vcregress.pl · 2e8d9544
      Peter Eisentraut 提交于
      This is how build.pl treats it and how it's documented.
      2e8d9544
    • P
      Fix typo · 908eb1f9
      Peter Eisentraut 提交于
      908eb1f9
    • P
      Add gitignore entries for Windows MSVC builds · 63e9c5b7
      Peter Eisentraut 提交于
      63e9c5b7
    • P
      001cbb14
    • T
      Refrain from canonicalizing a client_encoding setting of "UNICODE". · 390cf320
      Tom Lane 提交于
      While "UTF8" is the correct name for this encoding, existing JDBC drivers
      expect that if they send "UNICODE" it will read back the same way; they
      fail with an opaque "Protocol error" complaint if not.  This will be fixed
      in the 9.1 drivers, but until older drivers are no longer in use in the
      wild, we'd better leave "UNICODE" alone.  Continue to canonicalize all
      other inputs.  Per report from Steve Singer and subsequent discussion.
      390cf320
  5. 19 4月, 2011 3 次提交
  6. 18 4月, 2011 9 次提交
  7. 17 4月, 2011 2 次提交