1. 09 10月, 2012 1 次提交
  2. 02 1月, 2012 1 次提交
  3. 16 9月, 2011 1 次提交
    • T
      Redesign the plancache mechanism for more flexibility and efficiency. · e6faf910
      Tom Lane 提交于
      Rewrite plancache.c so that a "cached plan" (which is rather a misnomer
      at this point) can support generation of custom, parameter-value-dependent
      plans, and can make an intelligent choice between using custom plans and
      the traditional generic-plan approach.  The specific choice algorithm
      implemented here can probably be improved in future, but this commit is
      all about getting the mechanism in place, not the policy.
      
      In addition, restructure the API to greatly reduce the amount of extraneous
      data copying needed.  The main compromise needed to make that possible was
      to split the initial creation of a CachedPlanSource into two steps.  It's
      worth noting in particular that SPI_saveplan is now deprecated in favor of
      SPI_keepplan, which accomplishes the same end result with zero data
      copying, and no need to then spend even more cycles throwing away the
      original SPIPlan.  The risk of long-term memory leaks while manipulating
      SPIPlans has also been greatly reduced.  Most of this improvement is based
      on use of the recently-added MemoryContextSetParent primitive.
      e6faf910
  4. 12 9月, 2011 1 次提交
    • T
      Invent a new memory context primitive, MemoryContextSetParent. · b0025bd9
      Tom Lane 提交于
      This function will be useful for altering the lifespan of a context after
      creation (for example, by creating it under a transient context and later
      reparenting it to belong to a long-lived context).  It costs almost no new
      code, since we can refactor what was there.  Per my proposal of yesterday.
      b0025bd9
  5. 25 5月, 2011 1 次提交
    • T
      Cleanup for pull-up-isReset patch. · b23aeb65
      Tom Lane 提交于
      Clear isReset before, not after, calling the context-specific alloc method,
      so as to preserve the option to do a tail call in MemoryContextAlloc
      (and also so this code isn't assuming that a failed alloc call won't have
      changed the context's state before failing).  Fix missed direct invocation
      of reset method.  Reformat a comment.
      b23aeb65
  6. 22 5月, 2011 1 次提交
    • H
      Pull up isReset flag from AllocSetContext to MemoryContext struct. This · 30e98a7e
      Heikki Linnakangas 提交于
      avoids the overhead of one function call when calling MemoryContextReset(),
      and it seems like the isReset optimization would be applicable to any new
      memory context we might invent in the future anyway.
      
      This buys back the overhead I just added in previous patch to always call
      MemoryContextReset() in ExecScan, even when there's no quals or projections.
      30e98a7e
  7. 02 1月, 2011 1 次提交
  8. 21 9月, 2010 1 次提交
  9. 13 2月, 2010 1 次提交
    • T
      Support inlining various small performance-critical functions on non-GCC · e08ab7c3
      Tom Lane 提交于
      compilers, by applying a configure check to see if the compiler will accept
      an unreferenced "static inline foo ..." function without warnings.  It is
      believed that such warnings are the only reason not to declare inlined
      functions in headers, if the compiler understands "inline" at all.
      
      Kurt Harriman
      e08ab7c3
  10. 03 1月, 2010 1 次提交
  11. 16 7月, 2009 1 次提交
    • P
      Make backend header files C++ safe · de160e2c
      Peter Eisentraut 提交于
      This alters various incidental uses of C++ key words to use other similar
      identifiers, so that a C++ compiler won't choke outright.  You still
      (probably) need extern "C" { }; around the inclusion of backend headers.
      
      based on a patch by Kurt Harriman <harriman@acm.org>
      
      Also add a script cpluspluscheck to check for C++ compatibility in the
      future.  As of right now, this passes without error for me.
      de160e2c
  12. 02 1月, 2009 1 次提交
  13. 29 6月, 2008 1 次提交
  14. 19 6月, 2008 1 次提交
  15. 02 1月, 2008 1 次提交
  16. 07 8月, 2007 1 次提交
  17. 25 7月, 2007 1 次提交
  18. 13 3月, 2007 1 次提交
    • T
      First phase of plan-invalidation project: create a plan cache management · b9527e98
      Tom Lane 提交于
      module and teach PREPARE and protocol-level prepared statements to use it.
      In service of this, rearrange utility-statement processing so that parse
      analysis does not assume table schemas can't change before execution for
      utility statements (necessary because we don't attempt to re-acquire locks
      for utility statements when reusing a stored plan).  This requires some
      refactoring of the ProcessUtility API, but it ends up cleaner anyway,
      for instance we can get rid of the QueryContext global.
      
      Still to do: fix up SPI and related code to use the plan cache; I'm tempted to
      try to make SQL functions use it too.  Also, there are at least some aspects
      of system state that we want to ensure remain the same during a replan as in
      the original processing; search_path certainly ought to behave that way for
      instance, and perhaps there are others.
      b9527e98
  19. 06 1月, 2007 1 次提交
  20. 14 7月, 2006 1 次提交
  21. 05 3月, 2006 1 次提交
  22. 15 10月, 2005 1 次提交
  23. 15 5月, 2005 1 次提交
  24. 19 2月, 2005 1 次提交
  25. 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
  26. 18 10月, 2004 1 次提交
  27. 17 9月, 2004 1 次提交
  28. 29 8月, 2004 3 次提交
  29. 08 8月, 2004 1 次提交
  30. 01 7月, 2004 1 次提交
  31. 06 6月, 2004 1 次提交
  32. 30 11月, 2003 1 次提交
    • P
      · 969685ad
      PostgreSQL Daemon 提交于
      $Header: -> $PostgreSQL Changes ...
      969685ad
  33. 04 8月, 2003 2 次提交
  34. 26 7月, 2003 1 次提交
  35. 03 5月, 2003 1 次提交
    • T
      Portal and memory management infrastructure for extended query protocol. · de28dc9a
      Tom Lane 提交于
      Both plannable queries and utility commands are now always executed
      within Portals, which have been revamped so that they can handle the
      load (they used to be good only for single SELECT queries).  Restructure
      code to push command-completion-tag selection logic out of postgres.c,
      so that it won't have to be duplicated between simple and extended queries.
      initdb forced due to addition of a field to Query nodes.
      de28dc9a
  36. 28 3月, 2003 1 次提交
    • B
      This patch implements holdable cursors, following the proposal · 54f7338f
      Bruce Momjian 提交于
      (materialization into a tuple store) discussed on pgsql-hackers earlier.
      I've updated the documentation and the regression tests.
      
      Notes on the implementation:
      
      - I needed to change the tuple store API slightly -- it assumes that it
      won't be used to hold data across transaction boundaries, so the temp
      files that it uses for on-disk storage are automatically reclaimed at
      end-of-transaction. I added a flag to tuplestore_begin_heap() to control
      this behavior. Is changing the tuple store API in this fashion OK?
      
      - in order to store executor results in a tuple store, I added a new
      CommandDest. This works well for the most part, with one exception: the
      current DestFunction API doesn't provide enough information to allow the
      Executor to store results into an arbitrary tuple store (where the
      particular tuple store to use is chosen by the call site of
      ExecutorRun). To workaround this, I've temporarily hacked up a solution
      that works, but is not ideal: since the receiveTuple DestFunction is
      passed the portal name, we can use that to lookup the Portal data
      structure for the cursor and then use that to get at the tuple store the
      Portal is using. This unnecessarily ties the Portal code with the
      tupleReceiver code, but it works...
      
      The proper fix for this is probably to change the DestFunction API --
      Tom suggested passing the full QueryDesc to the receiveTuple function.
      In that case, callers of ExecutorRun could "subclass" QueryDesc to add
      any additional fields that their particular CommandDest needed to get
      access to. This approach would work, but I'd like to think about it for
      a little bit longer before deciding which route to go. In the mean time,
      the code works fine, so I don't think a fix is urgent.
      
      - (semi-related) I added a NO SCROLL keyword to DECLARE CURSOR, and
      adjusted the behavior of SCROLL in accordance with the discussion on
      -hackers.
      
      - (unrelated) Cleaned up some SGML markup in sql.sgml, copy.sgml
      
      Neil Conway
      54f7338f
  37. 17 12月, 2002 1 次提交
    • T
      Code review for palloc0 patch --- avoid dangerous and unnecessary · 88177f77
      Tom Lane 提交于
      practice of evaluating MemSet's arguments multiple times, except for
      the special case of newNode(), where we can assume the argument is
      a constant sizeof() operator.
      Also, add GetMemoryChunkContext() to mcxt.c's API, in preparation for
      fixing recent GEQO breakage.
      88177f77