1. 28 12月, 2006 4 次提交
    • T
      Modify local buffer management to request memory for local buffers in blocks · 72619f81
      Tom Lane 提交于
      of increasing size, instead of one at a time.  This reduces the memory
      management overhead when num_temp_buffers is large: in the previous coding
      we would actually waste 50% of the space used for temp buffers, because aset.c
      would round the individual requests up to 16K.  Problem noted while studying
      a performance issue reported by Steven Flatt.
      
      Back-patch as far as 8.1 --- older versions used few enough local buffers
      that the issue isn't significant for them.
      72619f81
    • T
      Improve memory management code to avoid inefficient behavior when a context · c22dea89
      Tom Lane 提交于
      has a small maxBlockSize: the maximum request size that we will treat as a
      "chunk" needs to be limited to fit in maxBlockSize.  Otherwise we will round
      up the request size to the next power of 2, wasting space, which is a bit
      pointless if we aren't going to make the blocks big enough to fit additional
      stuff in them.  The example motivating this is local buffer management, which
      makes repeated allocations of 8K (one BLCKSZ buffer) in TopMemoryContext,
      which has maxBlockSize = 8K because for the most part allocations there are
      small.  This leads to each local buffer actually eating 16K of space, which
      adds up when there are thousands of them.  I intend to change localbuf.c to
      aggregate its requests, which will prevent this particular misbehavior, but
      it seems likely that similar scenarios could arise elsewhere, so fixing the
      core problem seems wise as well.
      c22dea89
    • T
      Print combining characters (those reported as having zero width by · 6bb7b467
      Tom Lane 提交于
      PQdsplen()) normally, instead of replacing them by \uXXXX sequences.
      Assume that they in fact occupy zero screen space for formatting purposes.
      Per gripe from Michael Fuhr and ensuing discussion.
      6bb7b467
    • T
      Use FROM clause in example UPDATE commands where appropriate. Also · de9be563
      Tom Lane 提交于
      remove long-obsolete statement that there isn't a check for infinite
      recursion in view rules.
      de9be563
  2. 27 12月, 2006 5 次提交
    • B
      Use "dead" rather than "expired" for vacuumable rows. · 4f1e4911
      Bruce Momjian 提交于
      4f1e4911
    • T
      Fix failure due to accessing an already-freed tuple descriptor in a plan · 0cbc5b1e
      Tom Lane 提交于
      involving HashAggregate over SubqueryScan (this is the known case, there
      may well be more).  The bug is only latent in releases before 8.2 since they
      didn't try to access tupletable slots' descriptors during ExecDropTupleTable.
      The least bogus fix seems to be to make subqueries share the parent query's
      memory context, so that tupdescs they create will have the same lifespan as
      those of the parent query.  There are comments in the code envisioning going
      even further by not having a separate child EState at all, but that will
      require rethinking executor access to range tables, which I don't want to
      tackle right now.  Per bug report from Jean-Pierre Pelletier.
      0cbc5b1e
    • T
      Repair bug #2839: the various ExecReScan functions need to reset · 68996463
      Tom Lane 提交于
      ps_TupFromTlist in plan nodes that make use of it.  This was being done
      correctly in join nodes and Result nodes but not in any relation-scan nodes.
      Bug would lead to bogus results if a set-returning function appeared in the
      targetlist of a subquery that could be rescanned after partial execution,
      for example a subquery within EXISTS().  Bug has been around forever :-(
      ... surprising it wasn't reported before.
      68996463
    • T
      Repair bug #2836: SPI_execute_plan returned zero if none of the querytrees · fccf99f0
      Tom Lane 提交于
      were marked canSetTag.  While it's certainly correct to return the result
      of the last one that is marked canSetTag, it's less clear what to do when
      none of them are.  Since plpgsql will complain if zero is returned, the
      8.2.0 behavior isn't good.  I've fixed it to restore the prior behavior of
      returning the physically last query's result code when there are no
      canSetTag queries.
      fccf99f0
    • T
      Remove incorrect semicolon in example. Joachim Wieland · 4a836bad
      Tom Lane 提交于
      4a836bad
  3. 26 12月, 2006 2 次提交
  4. 25 12月, 2006 2 次提交
    • T
      Make HISTCONTROL=ignoredups work again (broken by misordering of · 506a9893
      Tom Lane 提交于
      operations during recent code refactoring).  Per bug #2840 from Ned Crigler.
      506a9893
    • T
      Bring some order and sanity to error handling in the xml patch. · 57f1630c
      Tom Lane 提交于
      Use a TRY block instead of (inadequate) ad-hoc coding to ensure that
      libxml is cleaned up after a failure.  Report the intended SQLCODE
      instead of defaulting to XX000.  Avoid risking use of a dangling
      pointer by keeping the persistent error buffer in TopMemoryContext.
      Be less trusting that error messages don't contain %.
      
      This patch doesn't do anything about changing the way the messages
      are put together --- this is just about mechanism.
      57f1630c
  5. 24 12月, 2006 2 次提交
  6. 23 12月, 2006 8 次提交
  7. 22 12月, 2006 4 次提交
  8. 21 12月, 2006 1 次提交
  9. 20 12月, 2006 2 次提交
  10. 19 12月, 2006 2 次提交
  11. 18 12月, 2006 1 次提交
  12. 17 12月, 2006 2 次提交
    • B
      Fix typo: · cdcee165
      Bruce Momjian 提交于
      <   While PostgreSQL clients runs fine limited-resource environments, the
      >   While PostgreSQL clients runs fine in limited-resource environments, the
      cdcee165
    • B
      Move entry into CLUSTER section: · 6874fb90
      Bruce Momjian 提交于
      < * Make CLUSTER preserve recently-dead tuples per MVCC requirements
      > 	o Make CLUSTER preserve recently-dead tuples per MVCC requirements
      6874fb90
  13. 16 12月, 2006 4 次提交
    • A
      enable \timing oputput for \copy commands · 7bdc55cc
      Andrew Dunstan 提交于
      7bdc55cc
    • T
      Fix some planner bugs exposed by reports from Arjen van der Meijden. These · 281f4018
      Tom Lane 提交于
      are all in new-in-8.2 logic associated with indexability of ScalarArrayOpExpr
      (IN-clauses) or amortization of indexscan costs across repeated indexscans
      on the inside of a nestloop.  In particular:
      
      Fix some logic errors in the estimation for multiple scans induced by a
      ScalarArrayOpExpr indexqual.
      
      Include a small cost component in bitmap index scans to reflect the costs of
      manipulating the bitmap itself; this is mainly to prevent a bitmap scan from
      appearing to have the same cost as a plain indexscan for fetching a single
      tuple.
      
      Also add a per-index-scan-startup CPU cost component; while prior releases
      were clearly too pessimistic about the cost of repeated indexscans, the
      original 8.2 coding allowed the cost of an indexscan to effectively go to zero
      if repeated often enough, which is overly optimistic.
      
      Pay some attention to index correlation when estimating costs for a nestloop
      inner indexscan: this is significant when the plan fetches multiple heap
      tuples per iteration, since high correlation means those tuples are probably
      on the same or adjacent heap pages.
      281f4018
    • T
      Put JST back into the default set of timezone abbreviations; · 782d68e3
      Tom Lane 提交于
      was removed in an unexplainable moment of brain fade.
      782d68e3
    • B
      Back out double-run of PDF/PS output. Requires building bookindex.sgml · 421c1ca4
      Bruce Momjian 提交于
      properly.
      
      Remove SGML docs about openjade performance patch, and instead add
      comment in style sheet where indenting code is commented out.
      
      Backpatch to 8.2.X.
      421c1ca4
  14. 15 12月, 2006 1 次提交
    • B
      TODO item not wanted: · 8186e7ef
      Bruce Momjian 提交于
      >
      > * Embedded server (not wanted)
      >
      >   While PostgreSQL clients runs fine limited-resource environments, the
      >   server requires multiple processes and a stable pool of resources to
      >   run reliabily and efficiently.  Stripping down the PostgreSQL server
      >   to run in the same process address space as the client application
      >   would add too much complexity and failure cases.
      8186e7ef