1. 13 2月, 2010 6 次提交
  2. 12 2月, 2010 8 次提交
  3. 11 2月, 2010 1 次提交
  4. 10 2月, 2010 7 次提交
    • H
      Now that streaming replication switches between streaming mode and · 161d9d51
      Heikki Linnakangas 提交于
      restoring from archive, the last WAL segment is not necessarily open at
      the end of recovery. Fix assertion that assumed that.
      
      Fujii Masao, fixing the assertion failure reported by Martin Pihlak.
      161d9d51
    • T
      Improve planner's choices about when to use hashing vs sorting for DISTINCT. · 76b6ee3f
      Tom Lane 提交于
      The previous coding missed a bet by sometimes picking the "sorted" path
      from query_planner even though hashing would be preferable.  To fix, we have
      to be willing to make the choice sooner.  This contorts things a little bit,
      but I thought of a factorization that makes it not too awful.
      76b6ee3f
    • T
      Fix up rickety handling of relation-truncation interlocks. · cbe9d6be
      Tom Lane 提交于
      Move rd_targblock, rd_fsm_nblocks, and rd_vm_nblocks from relcache to the smgr
      relation entries, so that they will get reset to InvalidBlockNumber whenever
      an smgr-level flush happens.  Because we now send smgr invalidation messages
      immediately (not at end of transaction) when a relation truncation occurs,
      this ensures that other backends will reset their values before they next
      access the relation.  We no longer need the unreliable assumption that a
      VACUUM that's doing a truncation will hold its AccessExclusive lock until
      commit --- in fact, we can intentionally release that lock as soon as we've
      completed the truncation.  This patch therefore reverts (most of) Alvaro's
      patch of 2009-11-10, as well as my marginal hacking on it yesterday.  We can
      also get rid of assorted no-longer-needed relcache flushes, which are far more
      expensive than an smgr flush because they kill a lot more state.
      
      In passing this patch fixes smgr_redo's failure to perform visibility-map
      truncation, and cleans up some rather dubious assumptions in freespace.c and
      visibilitymap.c about when rd_fsm_nblocks and rd_vm_nblocks can be out of
      date.
      cbe9d6be
    • H
      Fix bug in GIN WAL redo cleanup function: don't free fake relcache entry · 79647eed
      Heikki Linnakangas 提交于
      while it's still being used.
      
      Backpatch to 8.4, where the fake relcache method was introduced.
      79647eed
    • M
      Typo fix, per Thom Brown · 09c07475
      Magnus Hagander 提交于
      09c07475
    • M
      Define the value for in6addr_any on MingW, since it provides the struct · a8d3a395
      Magnus Hagander 提交于
      only in the header files and not in any libraries, yet declare it as
      an extern.
      a8d3a395
    • H
      Move "Warm Standby Servers for High Availability" and "Hot Standby" · 8740fe71
      Heikki Linnakangas 提交于
      sections under "High Availability, Load Balancing, and Replication"
      chapter. Streaming replication chapter needs a lot more work, but this
      commit just moves things around.
      8740fe71
  5. 09 2月, 2010 6 次提交
  6. 08 2月, 2010 9 次提交
    • B
      dfc90285
    • B
      Update high availability/replication documentation chart for new hot · 3ab41f02
      Bruce Momjian 提交于
      standby featureset.
      3ab41f02
    • H
      Remove piece of code to zero out minRecoveryPoint when starting crash · 4cea6031
      Heikki Linnakangas 提交于
      recovery. It's zeroed out whenever a checkpoint is written, so the only
      scenario where the removed code did anything is when you kill archive
      recovery, remove recovery.conf, and start up the server, so that it goes
      into crash recovery instead. That's a "don't do that" scenario, but it
      seems better to not clear minRecoveryPoint but instead update it like we
      do in archive recovery, which is what will now happen.
      4cea6031
    • T
      Remove CatalogCacheFlushRelation, and the reloidattr infrastructure that was · 9a75803b
      Tom Lane 提交于
      needed by nothing else.
      
      The restructuring I just finished doing on cache management exposed to me how
      silly this routine was.  Its function was to go into the catcache and blow
      away all entries related to a given relation when there was a relcache flush
      on that relation.  However, there is no point in removing a catcache entry
      if the catalog row it represents is still valid --- and if it isn't valid,
      there must have been a catcache entry flush on it, because that's triggered
      directly by heap_update or heap_delete on the catalog row.  So this routine
      accomplished nothing except to blow away valid cache entries that we'd very
      likely be wanting in the near future to help reconstruct the relcache entry.
      Dumb.
      
      On top of which, it required a subtle and easy-to-get-wrong attribute in
      syscache definitions, ie, the column containing the OID of the related
      relation if any.  Removing that is a very useful maintenance simplification.
      9a75803b
    • T
      Remove some more dead VACUUM-FULL-only code. · 68446b2c
      Tom Lane 提交于
      68446b2c
    • T
      Remove old-style VACUUM FULL (which was known for a little while as · 0a469c87
      Tom Lane 提交于
      VACUUM FULL INPLACE), along with a boatload of subsidiary code and complexity.
      Per discussion, the use case for this method of vacuuming is no longer large
      enough to justify maintaining it; not to mention that we don't wish to invest
      the work that would be needed to make it play nicely with Hot Standby.
      
      Aside from the code directly related to old-style VACUUM FULL, this commit
      removes support for certain WAL record types that could only be generated
      within VACUUM FULL, redirect-pointer removal in heap_page_prune, and
      nontransactional generation of cache invalidation sinval messages (the last
      being the sticking point for Hot Standby).
      
      We still have to retain all code that copes with finding HEAP_MOVED_OFF and
      HEAP_MOVED_IN flag bits on existing tuples.  This can't be removed as long
      as we want to support in-place update from pre-9.0 databases.
      0a469c87
    • T
      Work around deadlock problems with VACUUM FULL/CLUSTER on system catalogs, · 1ddc2703
      Tom Lane 提交于
      as per my recent proposal.
      
      First, teach IndexBuildHeapScan to not wait for INSERT_IN_PROGRESS or
      DELETE_IN_PROGRESS tuples to commit unless the index build is checking
      uniqueness/exclusion constraints.  If it isn't, there's no harm in just
      indexing the in-doubt tuple.
      
      Second, modify VACUUM FULL/CLUSTER to suppress reverifying
      uniqueness/exclusion constraint properties while rebuilding indexes of
      the target relation.  This is reasonable because these commands aren't
      meant to deal with corrupted-data situations.  Constraint properties
      will still be rechecked when an index is rebuilt by a REINDEX command.
      
      This gets us out of the problem that new-style VACUUM FULL would often
      wait for other transactions while holding exclusive lock on a system
      catalog, leading to probable deadlock because those other transactions
      need to look at the catalogs too.  Although the real ultimate cause of
      the problem is a debatable choice to release locks early after modifying
      system catalogs, changing that choice would require pretty serious
      analysis and is not something to be undertaken lightly or on a tight
      schedule.  The present patch fixes the problem in a fairly reasonable
      way and should also improve the speed of VACUUM FULL/CLUSTER a little bit.
      1ddc2703
    • T
      Looks like we need #include <sys/stat.h> here on some · 1c05b0b4
      Tom Lane 提交于
      platforms.  Per buildfarm.
      1c05b0b4
    • T
      Create a "relation mapping" infrastructure to support changing the relfilenodes · b9b8831a
      Tom Lane 提交于
      of shared or nailed system catalogs.  This has two key benefits:
      
      * The new CLUSTER-based VACUUM FULL can be applied safely to all catalogs.
      
      * We no longer have to use an unsafe reindex-in-place approach for reindexing
        shared catalogs.
      
      CLUSTER on nailed catalogs now works too, although I left it disabled on
      shared catalogs because the resulting pg_index.indisclustered update would
      only be visible in one database.
      
      Since reindexing shared system catalogs is now fully transactional and
      crash-safe, the former special cases in REINDEX behavior have been removed;
      shared catalogs are treated the same as non-shared.
      
      This commit does not do anything about the recently-discussed problem of
      deadlocks between VACUUM FULL/CLUSTER on a system catalog and other
      concurrent queries; will address that in a separate patch.  As a stopgap,
      parallel_schedule has been tweaked to run vacuum.sql by itself, to avoid
      such failures during the regression tests.
      b9b8831a
  7. 06 2月, 2010 3 次提交