1. 02 Sep, 2005 7 commits
    • Bruce Momjian's avatar
      Add: · da08559e
      Bruce Momjian authored
      > 	o Allow COPY into an empty table to skip WAL logging
      da08559e
    • Tom Lane's avatar
      Clean up a couple of ad-hoc computations of the maximum number of tuples · 35e9b1cc
      Tom Lane authored
      on a page, as suggested by ITAGAKI Takahiro.  Also, change a few places
      that were using some other estimates of max-items-per-page to consistently
      use MaxOffsetNumber.  This is conservatively large --- we could have used
      the new MaxHeapTuplesPerPage macro, or a similar one for index tuples ---
      but those places are simply declaring a fixed-size buffer and assuming it
      will work, rather than actively testing for overrun.  It seems safer to
      size these buffers in a way that can't overflow even if the page is
      corrupt.
      35e9b1cc
    • Tom Lane's avatar
      In copy_file, use a palloc'd buffer instead of just a local char array; · 962a4bb6
      Tom Lane authored
      a local array isn't guaranteed to have any particular alignment, and
      so it could slow down the data transfer.
      962a4bb6
    • Bruce Momjian's avatar
      Add text: · fad7e8ed
      Bruce Momjian authored
      * Merge xmin/xmax/cmin/cmax back into three header fields
      
        Before subtransactions, there used to be only three fields needed to
        store these four values. This was possible because only the current
        transaction looks at the cmin/cmax values. If the current transaction
        created and expired the row the fields stored where xmin (same as
        xmax), cmin, cmax, and if the transaction was expiring a row from a
        another transaction, the fields stored were xmin (cmin was not
        needed), xmax, and cmax. Such a system worked because a transaction
        could only see committed rows from another transaction. However,
        subtransactions can see rows from outer transactions, and once the
        subtransaction completes, the outer transaction continues, requiring
        the storage of all four fields. With subtransactions, an outer
        transaction can create a row, a subtransaction expire it, and when the
        subtransaction completes, the outer transaction still has to have
        proper visibility of the row, for example, for cursors.
      
        One possible solution is to create a phantom cid which represents a
        cmin/cmax pair and is stored in local memory.
      fad7e8ed
    • Tom Lane's avatar
      Add some notes about how pg_dump relates to the practices recommended · 6c0398a7
      Tom Lane authored
      under 'Populating a Database'.
      6c0398a7
    • Tom Lane's avatar
      Update performance discussion for 8.1. Add a little more explanatory · 9a412be5
      Tom Lane authored
      material in the EXPLAIN section, update examples to match current reality,
      show examples of bitmap indexscans as well as plain ones.
      9a412be5
    • Bruce Momjian's avatar
      Duplicate: · 55af2a43
      Bruce Momjian authored
      < * Maintain a map of recently-expired rows
      <
      <   This allows vacuum to target specific pages for possible free space
      <   without requiring a sequential scan.
      <
      Update entry:
      
      >   One complexity is that index entries still have to be vacuumed, and
      >   doing this without an index scan (by using the heap values to find the
      >   index entry) might be slow and unreliable, especially for user-defined
      >   index functions.
      55af2a43
  2. 01 Sep, 2005 6 commits
  3. 30 Aug, 2005 9 commits
  4. 29 Aug, 2005 5 commits
  5. 28 Aug, 2005 8 commits
  6. 27 Aug, 2005 5 commits
    • Tom Lane's avatar
      cost_agg really ought to charge something per output tuple; else there · 974e3cf3
      Tom Lane authored
      are cases where it appears to have zero run cost.
      974e3cf3
    • Tom Lane's avatar
      Change the division of labor between grouping_planner and query_planner · 4e5fbb34
      Tom Lane authored
      so that the latter estimates the number of groups that grouping will
      produce.  This is needed because it is primarily query_planner that
      makes the decision between fast-start and fast-finish plans, and in the
      original coding it was unable to make more than a crude rule-of-thumb
      choice when the query involved grouping.  This revision helps us make
      saner choices for queries like SELECT ... GROUP BY ... LIMIT, as in a
      recent example from Mark Kirkwood.  Also move the responsibility for
      canonicalizing sort_pathkeys and group_pathkeys into query_planner;
      this information has to be available anyway to support the first change,
      and doing it this way lets us get rid of compare_noncanonical_pathkeys
      entirely.
      4e5fbb34
    • Tom Lane's avatar
    • Tom Lane's avatar
      Fix two separate bugs in setrefs.c. set_subqueryscan_references needs · 5a7d3697
      Tom Lane authored
      to copy the whole plan tree before invoking adjust_plan_varnos(); else
      if there is any multiply-linked substructure, the latter might increment
      some Var's varno twice.  Previously there were some retail copyObject
      calls inside adjust_plan_varnos, but it seems a lot safer to just dup the
      whole tree first.  Also, set_inner_join_references was trying to avoid
      work by not recursing if a BitmapHeapScan's bitmapqualorig contained no
      outer references; which was OK at the time the code was written, I think,
      but now that create_bitmap_scan_plan removes duplicate clauses from
      bitmapqualorig it is possible for that field to be NULL while outer
      references still remain in the qpqual and/or contained indexscan nodes.
      For safety, always recurse even if the BitmapHeapScan looks to be outer
      reference free.  Per reports from Michael Fuhr and Oleg Bartunov.
      5a7d3697
    • Tom Lane's avatar
      Get the MIPS assembler syntax right. Also add a separate sync command; · 5824d021
      Tom Lane authored
      the reference I consulted yesterday said SC does a SYNC, but apparently
      this is not true on newer MIPS processors, so be safe.
      5824d021