1. 19 12月, 2008 1 次提交
  2. 16 12月, 2008 1 次提交
    • T
      Arrange for the pg_foo_is_visible and has_foo_privilege families of functions · 66bb74db
      Tom Lane 提交于
      to return NULL, instead of erroring out, if the target object is specified by
      OID and we can't find that OID in the catalogs.  Since these functions operate
      internally on SnapshotNow rules, there is a race condition when using them
      in user queries: the query's MVCC snapshot might "see" a catalog row that's
      already committed dead, leading to a failure when the inquiry function is
      applied.  Returning NULL should generally provide more convenient behavior.
      This issue has been complained of before, and in particular we are now seeing
      it in the regression tests due to another recent patch.
      66bb74db
  3. 05 12月, 2008 1 次提交
  4. 03 12月, 2008 1 次提交
    • H
      Introduce visibility map. The visibility map is a bitmap with one bit per · 608195a3
      Heikki Linnakangas 提交于
      heap page, where a set bit indicates that all tuples on the page are
      visible to all transactions, and the page therefore doesn't need
      vacuuming. It is stored in a new relation fork.
      
      Lazy vacuum uses the visibility map to skip pages that don't need
      vacuuming. Vacuum is also responsible for setting the bits in the map.
      In the future, this can hopefully be used to implement index-only-scans,
      but we can't currently guarantee that the visibility map is always 100%
      up-to-date.
      
      In addition to the visibility map, there's a new PD_ALL_VISIBLE flag on
      each heap page, also indicating that all tuples on the page are visible to
      all transactions. It's important that this flag is kept up-to-date. It
      is also used to skip visibility tests in sequential scans, which gives a
      small performance gain on seqscans.
      608195a3
  5. 29 11月, 2008 1 次提交
  6. 27 11月, 2008 3 次提交
  7. 26 11月, 2008 1 次提交
  8. 20 11月, 2008 1 次提交
  9. 19 11月, 2008 1 次提交
    • H
      Rethink the way FSM truncation works. Instead of WAL-logging FSM · 33960006
      Heikki Linnakangas 提交于
      truncations in FSM code, call FreeSpaceMapTruncateRel from smgr_redo. To
      make that cleaner from modularity point of view, move the WAL-logging one
      level up to RelationTruncate, and move RelationTruncate and all the
      related WAL-logging to new src/backend/catalog/storage.c file. Introduce
      new RelationCreateStorage and RelationDropStorage functions that are used
      instead of calling smgrcreate/smgrscheduleunlink directly. Move the
      pending rel deletion stuff from smgrcreate/smgrscheduleunlink to the new
      functions. This leaves smgr.c as a thin wrapper around md.c; all the
      transactional stuff is now in storage.c.
      
      This will make it easier to add new forks with similar truncation logic,
      like the visibility map.
      33960006
  10. 15 11月, 2008 1 次提交
    • T
      In CREATE AGGREGATE, allow the transition datatype to be "internal", but only · 9e0247ab
      Tom Lane 提交于
      if the user is superuser.  This makes available to extension modules the same
      sort of trick being practiced by array_agg().  The reason for the superuser
      restriction is that you could crash the system by connecting up an
      incompatible pair of internal-using functions as an aggregate.  It shouldn't
      interfere with any legitimate use, since you'd have to be superuser to create
      the internal-using transition and final functions anyway.
      9e0247ab
  11. 14 11月, 2008 2 次提交
  12. 13 11月, 2008 1 次提交
  13. 11 11月, 2008 1 次提交
  14. 10 11月, 2008 1 次提交
    • T
      Replace pg_class.reltriggers with relhastriggers, which is just a boolean hint · e4718f2c
      Tom Lane 提交于
      ("there might be triggers") rather than an exact count.  This is necessary
      catalog infrastructure for the upcoming patch to reduce the strength of
      locking needed for trigger addition/removal.  Split out and committed
      separately for ease of reviewing/testing.
      
      In passing, also get rid of the unused pg_class columns relukeys, relfkeys,
      and relrefs, which haven't been maintained in many years and now have no
      chance of ever being maintained (because of wishing to avoid locking).
      
      Simon Riggs
      e4718f2c
  15. 02 11月, 2008 1 次提交
    • T
      Remove all uses of the deprecated functions heap_formtuple, heap_modifytuple, · 902d1cb3
      Tom Lane 提交于
      and heap_deformtuple in favor of the newer functions heap_form_tuple et al
      (which do the same things but use bool control flags instead of arbitrary
      char values).  Eliminate the former duplicate coding of these functions,
      reducing the deprecated functions to mere wrappers around the newer ones.
      We can't get rid of them entirely because add-on modules probably still
      contain many instances of the old coding style.
      
      Kris Jurka
      902d1cb3
  16. 29 10月, 2008 2 次提交
  17. 28 10月, 2008 1 次提交
  18. 27 10月, 2008 2 次提交
  19. 23 10月, 2008 2 次提交
  20. 22 10月, 2008 1 次提交
  21. 21 10月, 2008 1 次提交
  22. 20 10月, 2008 4 次提交
  23. 18 10月, 2008 2 次提交
  24. 15 10月, 2008 2 次提交
  25. 06 10月, 2008 1 次提交
  26. 05 10月, 2008 1 次提交
    • T
      Implement SQL-standard WITH clauses, including WITH RECURSIVE. · 44d5be0e
      Tom Lane 提交于
      There are some unimplemented aspects: recursive queries must use UNION ALL
      (should allow UNION too), and we don't have SEARCH or CYCLE clauses.
      These might or might not get done for 8.4, but even without them it's a
      pretty useful feature.
      
      There are also a couple of small loose ends and definitional quibbles,
      which I'll send a memo about to pgsql-hackers shortly.  But let's land
      the patch now so we can get on with other development.
      
      Yoshiyuki Asaba, with lots of help from Tatsuo Ishii and Tom Lane
      44d5be0e
  27. 30 9月, 2008 1 次提交
    • H
      Rewrite the FSM. Instead of relying on a fixed-size shared memory segment, the · 15c121b3
      Heikki Linnakangas 提交于
      free space information is stored in a dedicated FSM relation fork, with each
      relation (except for hash indexes; they don't use FSM).
      
      This eliminates the max_fsm_relations and max_fsm_pages GUC options; remove any
      trace of them from the backend, initdb, and documentation.
      
      Rewrite contrib/pg_freespacemap to match the new FSM implementation. Also
      introduce a new variant of the get_raw_page(regclass, int4, int4) function in
      contrib/pageinspect that let's you to return pages from any relation fork, and
      a new fsm_page_contents() function to inspect the new FSM pages.
      15c121b3
  28. 22 9月, 2008 1 次提交
    • T
      Simplify the definitions of a couple of system views by using SELECT * · 579c025e
      Tom Lane 提交于
      instead of listing all the columns returned by the underlying function.
      
      initdb not forced since this patch doesn't actually change anything about
      the stored form of the views.  It just means there's one less place to change
      if someone wants to add columns to them.
      579c025e
  29. 16 9月, 2008 1 次提交
    • T
      Change hash indexes to store only the hash code rather than the whole indexed · 4adc2f72
      Tom Lane 提交于
      value.  This means that hash index lookups are always lossy and have to be
      rechecked when the heap is visited; however, the gain in index compactness
      outweighs this when the indexed values are wide.  Also, we only need to
      perform datatype comparisons when the hash codes match exactly, rather than
      for every entry in the hash bucket; so it could also win for datatypes that
      have expensive comparison functions.  A small additional win is gained by
      keeping hash index pages sorted by hash code and using binary search to reduce
      the number of index tuples we have to look at.
      
      Xiao Meng
      
      This commit also incorporates Zdenek Kotala's patch to isolate hash metapages
      and hash bitmaps a bit better from the page header datastructures.
      4adc2f72