1. 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
  2. 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
  3. 16 12月, 2002 1 次提交
    • T
      Tweak default memory context allocation policy so that a context is not · e64c7feb
      Tom Lane 提交于
      given any malloc block until something is first allocated in it; but
      thereafter, MemoryContextReset won't release that first malloc block.
      This preserves the quick-reset property of the original policy, without
      forcing 8K to be allocated to every context whether any of it is ever
      used or not.  Also, remove some more no-longer-needed explicit freeing
      during ExecEndPlan.
      e64c7feb
  4. 05 9月, 2002 1 次提交
  5. 12 8月, 2002 1 次提交
    • T
      Change memory-space accounting mechanism in tuplesort.c and tuplestore.c · 77a7e996
      Tom Lane 提交于
      to make a reasonable attempt at accounting for palloc overhead, not just
      the requested size of each memory chunk.  Since in many scenarios this
      will make for a significant reduction in the amount of space acquired,
      partially compensate by doubling the default value of SORT_MEM to 1Mb.
      Per discussion in pgsql-general around 9-Jun-2002..
      77a7e996
  6. 21 6月, 2002 1 次提交
  7. 06 11月, 2001 1 次提交
  8. 25 10月, 2001 1 次提交
  9. 22 3月, 2001 1 次提交
  10. 06 2月, 2001 1 次提交
    • T
      Out-of-bounds memory allocation request sizes should be treated as just · 85c17dbf
      Tom Lane 提交于
      elog(ERROR) not an Assert trap, since we've downgraded out-of-memory to
      elog(ERROR) not a fatal error.  Also, change the hard boundary from 256Mb
      to 1Gb, just so that anyone who's actually got that much memory to spare
      can play with TOAST objects approaching a gigabyte.
      85c17dbf
  11. 25 1月, 2001 1 次提交
  12. 22 1月, 2001 1 次提交
  13. 12 1月, 2001 1 次提交
  14. 01 12月, 2000 1 次提交
  15. 11 7月, 2000 1 次提交
    • B
      Here is the patch with memory leak checker. This checker allow detect · 46fb9c29
      Bruce Momjian 提交于
      in-chunk leaks, overwrite-next-chunk leaks and overwrite block-freeptr leaks.
      
      A in-chunk leak --- if something overwrite space after wanted (via palloc()
      size, but it is still inside chunk. For example
      
              x = palloc(12);         /* create 16b chunk */
              memset(x, '#', 13);
      
      this leak is in the current source total invisible, because chunk is 16b and
      leak is in the "align space".
      
       For this feature I add data_size to StandardChunk, and all memory which go
      from AllocSetAlloc() is marked as 0x7F.
      
       The MemoryContextCheck() is compiled '#ifdef USE_ASSERT_CHECKING'.
      
      I add this checking to 'tcop/postgres.c' and is active after each backend
      query, but it is probably not sufficient, because some MemoryContext exist
      only during memory processing --- will good if someone who known where
      it is needful (Tom:-) add it for others contexts;
       A problem in the current source is that we have still some malloc()
      allocation that is not needful and this allocation is total invisible for
      all context routines. For example Dllist in backend (pretty dirty it is in
      catcache where values in Dllist are palloc-ed, but list is malloc-ed).
      --- and BTW. this Dllist design stand in the way for query cache :-)
      
       Tom, if you agree I start replace some mallocs.
      
       BTW. --- Tom, have you idea for across transaction presistent allocation for
                SQL functions? (like regex - now it is via malloc)
      
      
       I almost forget. I add one if() to AllocSetAlloc(), for 'size' that are
      greater than ALLOC_BIGCHUNK_LIMIT is not needful check AllocSetFreeIndex(),
      because 'fidx' is always 'ALLOCSET_NUM_FREELISTS - 1'. It a little brisk up
      allocation for very large chunks. Right?
      
                                                      Karel
      46fb9c29
  16. 28 6月, 2000 1 次提交
    • T
      First phase of memory management rewrite (see backend/utils/mmgr/README · 1aebc361
      Tom Lane 提交于
      for details).  It doesn't really do that much yet, since there are no
      short-term memory contexts in the executor, but the infrastructure is
      in place and long-term contexts are handled reasonably.  A few long-
      standing bugs have been fixed, such as 'VACUUM; anything' in a single
      query string crashing.  Also, out-of-memory is now considered a
      recoverable ERROR, not FATAL.
      Eliminate a large amount of crufty, now-dead code in and around
      memory management.
      Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and
      backend startup.
      1aebc361
  17. 21 5月, 2000 1 次提交
  18. 13 4月, 2000 1 次提交
  19. 26 1月, 2000 1 次提交
    • B
      Add: · 5c25d602
      Bruce Momjian 提交于
        * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
      
      to all files copyright Regents of Berkeley.  Man, that's a lot of files.
      5c25d602
  20. 23 10月, 1999 1 次提交
  21. 25 8月, 1999 1 次提交
    • T
      Alter AllocSet routines so that requests larger than · 2b67dc53
      Tom Lane 提交于
      ALLOC_BIGCHUNK_LIMIT are always allocated as separate malloc() blocks,
      and are free()d immediately upon pfree().  Also, if such a chunk is enlarged
      with repalloc(), translate the operation into a realloc() so as to
      minimize memory usage.  Of course, these large chunks still get freed
      automatically if the alloc set is reset.
      I have set ALLOC_BIGCHUNK_LIMIT at 64K for now, but perhaps another
      size would be better?
      2b67dc53
  22. 15 7月, 1999 1 次提交
  23. 14 7月, 1999 1 次提交
  24. 17 6月, 1999 1 次提交
  25. 26 5月, 1999 3 次提交
  26. 23 5月, 1999 1 次提交
  27. 26 3月, 1999 1 次提交
  28. 25 3月, 1999 1 次提交
  29. 14 2月, 1999 1 次提交
  30. 07 2月, 1999 1 次提交
  31. 27 12月, 1998 1 次提交
    • B
      Long awaited port for NetBSD/m68k was finally done by Mr. Mutsuki · 58e539e5
      Bruce Momjian 提交于
      Nakajima. Since he is not subscribing the mailing list, I'm posting
      his patches by his request.  According to him, he has successfully
      compiled and passed the regression test on Mac SE/30 running
      NetBSD/m68k. Also, another person has reported that with the patches
      PostgreSQL is working on NetBSD/sun3 too.
      --
      Tatsuo Ishii
      58e539e5
  32. 07 9月, 1998 1 次提交
  33. 01 9月, 1998 1 次提交
  34. 27 4月, 1998 1 次提交
    • M
      From: Ryan Kirkpatrick <rkirkpat@nag.cs.colorado.edu> · 1af6b564
      Marc G. Fournier 提交于
              Ok, I have finally gotten all of the defines for Dec/Alpha and
      Linux/Alpha sorted out as Marc asked. There is no longer any need for
      '-Dalpha' or '-Dlinuxalpha' in either the Dec/Alpha or the Linux/Alpha
      template files (./src/template/{alpha,linuxalpha}). I have replaced every
      instance of 'alpha' or '__alpha__' with '__alpha', as that appears to be
      the common symbol between C compilers on both operating systems (RH4.2 &
      DecUnix 4.0b) for alpha.
      1af6b564
  35. 12 4月, 1998 1 次提交
  36. 26 2月, 1998 1 次提交
  37. 25 1月, 1998 1 次提交
  38. 12 1月, 1998 1 次提交