1. 15 4月, 2005 1 次提交
    • T
      Completion of project to use fixed OIDs for all system catalogs and · 162bd08b
      Tom Lane 提交于
      indexes.  Replace all heap_openr and index_openr calls by heap_open
      and index_open.  Remove runtime lookups of catalog OID numbers in
      various places.  Remove relcache's support for looking up system
      catalogs by name.  Bulky but mostly very boring patch ...
      162bd08b
  2. 07 4月, 2005 1 次提交
    • T
      Merge Resdom nodes into TargetEntry nodes to simplify code and save a · ad161bcc
      Tom Lane 提交于
      few palloc's.  I also chose to eliminate the restype and restypmod fields
      entirely, since they are redundant with information stored in the node's
      contained expression; re-examining the expression at need seems simpler
      and more reliable than trying to keep restype/restypmod up to date.
      
      initdb forced due to change in contents of stored rules.
      ad161bcc
  3. 21 3月, 2005 1 次提交
    • T
      Convert index-related tuple handling routines from char 'n'/' ' to bool · ee4ddac1
      Tom Lane 提交于
      convention for isnull flags.  Also, remove the useless InsertIndexResult
      return struct from index AM aminsert calls --- there is no reason for
      the caller to know where in the index the tuple was inserted, and we
      were wasting a palloc cycle per insert to deliver this uninteresting
      value (plus nontrivial complexity in some AMs).
      I forced initdb because of the change in the signature of the aminsert
      routines, even though nothing really looks at those pg_proc entries...
      ee4ddac1
  4. 17 3月, 2005 1 次提交
    • T
      Revise TupleTableSlot code to avoid unnecessary construction and disassembly · f97aebd1
      Tom Lane 提交于
      of tuples when passing data up through multiple plan nodes.  A slot can now
      hold either a normal "physical" HeapTuple, or a "virtual" tuple consisting
      of Datum/isnull arrays.  Upper plan levels can usually just copy the Datum
      arrays, avoiding heap_formtuple() and possible subsequent nocachegetattr()
      calls to extract the data again.  This work extends Atsushi Ogawa's earlier
      patch, which provided the key idea of adding Datum arrays to TupleTableSlots.
      (I believe however that something like this was foreseen way back in Berkeley
      days --- see the old comment on ExecProject.)  A test case involving many
      levels of join of fairly wide tables (about 80 columns altogether) showed
      about 3x overall speedup, though simple queries will probably not be
      helped very much.
      
      I have also duplicated some code in heaptuple.c in order to provide versions
      of heap_formtuple and friends that use "bool" arrays to indicate null
      attributes, instead of the old convention of "char" arrays containing either
      'n' or ' '.  This provides a better match to the convention used by
      ExecEvalExpr.  While I have not made a concerted effort to get rid of uses
      of the old routines, I think they should be deprecated and eventually removed.
      f97aebd1
  5. 01 1月, 2005 1 次提交
    • P
      · 2ff50159
      PostgreSQL Daemon 提交于
      Tag appropriate files for rc3
      
      Also performed an initial run through of upgrading our Copyright date to
      extend to 2005 ... first run here was very simple ... change everything
      where: grep 1996-2004 && the word 'Copyright' ... scanned through the
      generated list with 'less' first, and after, to make sure that I only
      picked up the right entries ...
      2ff50159
  6. 01 10月, 2004 1 次提交
  7. 12 9月, 2004 1 次提交
    • T
      Renumber SnapshotNow and the other special snapshot codes so that · 493f7260
      Tom Lane 提交于
      ((Snapshot) NULL) can no longer be confused with a valid snapshot,
      as per my recent suggestion.  Define a macro InvalidSnapshot for 0.
      Use InvalidSnapshot instead of SnapshotAny as the do-nothing special
      case for heap_update and heap_delete crosschecks; this seems a little
      cleaner even though the behavior is really the same.
      493f7260
  8. 29 8月, 2004 2 次提交
  9. 31 5月, 2004 1 次提交
  10. 26 5月, 2004 1 次提交
    • N
      Reimplement the linked list data structure used throughout the backend. · d0b4399d
      Neil Conway 提交于
      In the past, we used a 'Lispy' linked list implementation: a "list" was
      merely a pointer to the head node of the list. The problem with that
      design is that it makes lappend() and length() linear time. This patch
      fixes that problem (and others) by maintaining a count of the list
      length and a pointer to the tail node along with each head node pointer.
      A "list" is now a pointer to a structure containing some meta-data
      about the list; the head and tail pointers in that structure refer
      to ListCell structures that maintain the actual linked list of nodes.
      
      The function names of the list API have also been changed to, I hope,
      be more logically consistent. By default, the old function names are
      still available; they will be disabled-by-default once the rest of
      the tree has been updated to use the new API names.
      d0b4399d
  11. 18 3月, 2004 1 次提交
    • T
      Reimplement CASE val WHEN compval1 THEN ... WHEN compval2 THEN ... END · 55f7c330
      Tom Lane 提交于
      so that the 'val' is computed only once, per recent discussion.  The
      speedup is not much when 'val' is just a simple variable, but could be
      significant for larger expressions.  More importantly this avoids issues
      with multiple evaluations of a volatile 'val', and it allows the CASE
      expression to be reverse-listed in its original form by ruleutils.c.
      55f7c330
  12. 22 1月, 2004 1 次提交
  13. 19 12月, 2003 1 次提交
  14. 30 11月, 2003 1 次提交
    • P
      · 969685ad
      PostgreSQL Daemon 提交于
      $Header: -> $PostgreSQL Changes ...
      969685ad
  15. 02 10月, 2003 1 次提交
    • T
      Repair RI trigger visibility problems (this time for sure ;-)) per recent · 55d85f42
      Tom Lane 提交于
      discussion on pgsql-hackers: in READ COMMITTED mode we just have to force
      a QuerySnapshot update in the trigger, but in SERIALIZABLE mode we have
      to run the scan under a current snapshot and then complain if any rows
      would be updated/deleted that are not visible in the transaction snapshot.
      55d85f42
  16. 26 9月, 2003 1 次提交
  17. 25 9月, 2003 1 次提交
    • T
      Repair some REINDEX problems per recent discussions. The relcache is · a56a016c
      Tom Lane 提交于
      now able to cope with assigning new relfilenode values to nailed-in-cache
      indexes, so they can be reindexed using the fully crash-safe method.  This
      leaves only shared system indexes as special cases.  Remove the 'index
      deactivation' code, since it provides no useful protection in the shared-
      index case.  Require reindexing of shared indexes to be done in standalone
      mode, but remove other restrictions on REINDEX.  -P (IgnoreSystemIndexes)
      now prevents using indexes for lookups, but does not disable index updates.
      It is therefore safe to allow from PGOPTIONS.  Upshot: reindexing system catalogs
      can be done without a standalone backend for all cases except
      shared catalogs.
      a56a016c
  18. 09 8月, 2003 1 次提交
  19. 04 8月, 2003 2 次提交
  20. 29 5月, 2003 1 次提交
    • T
      Replace functional-index facility with expressional indexes. Any column · fc8d970c
      Tom Lane 提交于
      of an index can now be a computed expression instead of a simple variable.
      Restrictions on expressions are the same as for predicates (only immutable
      functions, no sub-selects).  This fixes problems recently introduced with
      inlining SQL functions, because the inlining transformation is applied to
      both expression trees so the planner can still match them up.  Along the
      way, improve efficiency of handling index predicates (both predicates and
      index expressions are now cached by the relcache) and fix 7.3 oversight
      that didn't record dependencies of predicate expressions.
      fc8d970c
  21. 06 5月, 2003 1 次提交
  22. 09 2月, 2003 2 次提交
  23. 23 1月, 2003 1 次提交
  24. 12 1月, 2003 1 次提交
  25. 18 12月, 2002 1 次提交
  26. 16 12月, 2002 1 次提交
  27. 14 12月, 2002 1 次提交
  28. 05 12月, 2002 1 次提交
    • T
      Phase 1 of read-only-plans project: cause executor state nodes to point · 1fd0c59e
      Tom Lane 提交于
      to plan nodes, not vice-versa.  All executor state nodes now inherit from
      struct PlanState.  Copying of plan trees has been simplified by not
      storing a list of SubPlans in Plan nodes (eliminating duplicate links).
      The executor still needs such a list, but it can build it during
      ExecutorStart since it has to scan the plan tree anyway.
      No initdb forced since no stored-on-disk structures changed, but you
      will need a full recompile because of node-numbering changes.
      1fd0c59e
  29. 05 9月, 2002 1 次提交
  30. 02 9月, 2002 1 次提交
    • T
      Code review for HeapTupleHeader changes. Add version number to page headers · c7a165ad
      Tom Lane 提交于
      (overlaying low byte of page size) and add HEAP_HASOID bit to t_infomask,
      per earlier discussion.  Simplify scheme for overlaying fields in tuple
      header (no need for cmax to live in more than one place).  Don't try to
      clear infomask status bits in tqual.c --- not safe to do it there.  Don't
      try to force output table of a SELECT INTO to have OIDs, either.  Get rid
      of unnecessarily complex three-state scheme for TupleDesc.tdhasoids, which
      has already caused one recent failure.  Improve documentation.
      c7a165ad
  31. 06 8月, 2002 1 次提交
    • T
      Restructure local-buffer handling per recent pghackers discussion. · 5df307c7
      Tom Lane 提交于
      The local buffer manager is no longer used for newly-created relations
      (unless they are TEMP); a new non-TEMP relation goes through the shared
      bufmgr and thus will participate normally in checkpoints.  But TEMP relations
      use the local buffer manager throughout their lifespan.  Also, operations
      in TEMP relations are not logged in WAL, thus improving performance.
      Since it's no longer necessary to fsync relations as they move out of the
      local buffers into shared buffers, quite a lot of smgr.c/md.c/fd.c code
      is no longer needed and has been removed: there's no concept of a dirty
      relation anymore in md.c/fd.c, and we never fsync anything but WAL.
      Still TODO: improve local buffer management algorithms so that it would
      be reasonable to increase NLocBuffer.
      5df307c7
  32. 20 7月, 2002 1 次提交
    • B
      oid is needed, it is added at the end of the struct (after the null · b0f5086e
      Bruce Momjian 提交于
      bitmap, if present).
      
      Per Tom Lane's suggestion the information whether a tuple has an oid
      or not is carried in the tuple descriptor.  For debugging reasons
      tdhasoid is of type char, not bool.  There are predefined values for
      WITHOID, WITHOUTOID and UNDEFOID.
      
      This patch has been generated against a cvs snapshot from last week
      and I don't expect it to apply cleanly to current sources.  While I
      post it here for public review, I'm working on a new version against a
      current snapshot.  (There's been heavy activity recently; hope to
      catch up some day ...)
      
      This is a long patch;  if it is too hard to swallow, I can provide it
      in smaller pieces:
      
      Part 1:  Accessor macros
      Part 2:  tdhasoid in TupDesc
      Part 3:  Regression test
      Part 4:  Parameter withoid to heap_addheader
      Part 5:  Eliminate t_oid from HeapTupleHeader
      
      Part 2 is the most hairy part because of changes in the executor and
      even in the parser;  the other parts are straightforward.
      
      Up to part 4 the patched postmaster stays binary compatible to
      databases created with an unpatched version.  Part 5 is small (100
      lines) and finally breaks compatibility.
      
      Manfred Koizar
      b0f5086e
  33. 27 6月, 2002 1 次提交
    • B
      The attached patch fixes some spelling mistakes, makes the · 73ad6ca9
      Bruce Momjian 提交于
      comments on one of the optimizer functions a lot more
      clear, adds a summary of the recent KSQO discussion to the
      comments in the code, adds regression tests for the bug with
      sequence state Tom fixed recently and another reg. test, and
      removes some PostQuel legacy stuff: ExecAppend -> ExecInsert,
      ExecRetrieve -> ExecSelect, etc.
      
      Error messages remain unchanged until a vote.
      
      Neil Conway
      73ad6ca9
  34. 26 6月, 2002 2 次提交
    • B
      Back out cleanup patch. Got old version and needs work. · e2c00704
      Bruce Momjian 提交于
      Neil Conway
      e2c00704
    • B
      The attached patch fixes some spelling mistakes, makes the · ed275aea
      Bruce Momjian 提交于
      comments on one of the optimizer functions a lot more
      clear, adds a summary of the recent KSQO discussion to the
      comments in the code, adds regression tests for the bug with
      sequence state Tom fixed recently and another reg. test, and
      removes some PostQuel legacy stuff: ExecAppend -> ExecInsert,
      ExecRetrieve -> ExecSelect, etc. This was changed because the
      elog() messages from this routine are user-visible, so we
      should be using the SQL terms.
      
      Neil Conway
      ed275aea
  35. 21 6月, 2002 1 次提交
  36. 25 5月, 2002 1 次提交
    • T
      Mark index entries "killed" when they are no longer visible to any · 3f4d4880
      Tom Lane 提交于
      transaction, so as to avoid returning them out of the index AM.  Saves
      repeated heap_fetch operations on frequently-updated rows.  Also detect
      queries on unique keys (equality to all columns of a unique index), and
      don't bother continuing scan once we have found first match.
      
      Killing is implemented in the btree and hash AMs, but not yet in rtree
      or gist, because there isn't an equally convenient place to do it in
      those AMs (the outer amgetnext routine can't do it without re-pinning
      the index page).
      
      Did some small cleanup on APIs of HeapTupleSatisfies, heap_fetch, and
      index_insert to make this a little easier.
      3f4d4880