1. 13 6月, 1999 2 次提交
    • T
      Plug hole in dike: planner would coredump if query_planner · acf242da
      Tom Lane 提交于
      returned NULL, which it will do in some cases where an elog(ERROR) would
      probably be more appropriate.  For the moment, generate a not-very-
      informative error message rather than proceeding to certain coredump.
      Probably ought to think about making query_planner elog instead of
      returning NULL, but this is at least a safe change for now.
      acf242da
    • T
      When targetlist is NULL, ExecTargetList was passing back a · 1918a1d1
      Tom Lane 提交于
      pointer to palloc'd but uninitialized memory.  This is not cool; anyone looking
      at the returned 'tuple' would at best coredump and at worst behave in a
      bizarre and irreproducible way.  Fix it to return a predictable value,
      namely a correctly-set-up palloc'd tuple containing zero attributes.
      I believe this fix is both safe and critical.
      1918a1d1
  2. 12 6月, 1999 2 次提交
    • B
      Reversed out Massimo patch. · 0c3281ce
      Bruce Momjian 提交于
      0c3281ce
    • B
      I don't like last minute patches before the final freeze, but I believe that · 603e153b
      Bruce Momjian 提交于
      this one could be useful for people experiencing out-of-memory crashes while
      executing queries which retrieve or use a very large number of tuples.
      
      The problem happens when storage is allocated for functions results used in
      a large query, for example:
      
        select upper(name) from big_table;
        select big_table.array[1] from big_table;
        select count(upper(name)) from big_table;
      
      This patch is a dirty hack that fixes the out-of-memory problem for the most
      common cases, like the above ones. It is not the final solution for the
      problem but it can work for some people, so I'm posting it.
      
      The patch should be safe because all changes are under #ifdef. Furthermore
      the feature can be enabled or disabled at runtime by the `free_tuple_memory'
      options in the pg_options file. The option is disabled by default and must
      be explicitly enabled at runtime to have any effect.
      
      To enable the patch add the follwing line to Makefile.custom:
      
      CUSTOM_COPT += -DFREE_TUPLE_MEMORY
      
      To enable the option at runtime add the following line to pg_option:
      
      free_tuple_memory=1
      
      Massimo
      603e153b
  3. 11 6月, 1999 10 次提交
  4. 10 6月, 1999 2 次提交
    • V
      1. Fix for elog(ERROR, "EvalPlanQual: t_xmin is uncommitted ?!") · 78f7ccc9
      Vadim B. Mikheev 提交于
         and possibly for other cases too:
      
         DO NOT cache status of transaction in unknown state
         (i.e. non-committed and non-aborted ones)
      
         Example:
         T1 reads row updated/inserted by running T2 and cache T2 status.
         T2 commits.
         Now T1 reads a row updated by T2 and with HEAP_XMAX_COMMITTED
         in t_infomask (so cached T2 status is not changed).
         Now T1 EvalPlanQual gets updated row version without HEAP_XMIN_COMMITTED
         -> TransactionIdDidCommit(t_xmin) and TransactionIdDidAbort(t_xmin)
         return FALSE and T2 decides that t_xmin is not committed and gets
         ERROR above.
      
         It's too late to find more smart way to handle such cases and so
         I just changed xact status caching and got rid TransactionIdFlushCache()
         from code.
      
         Changed: transam.c, xact.c, lmgr.c and transam.h - last three
         just because of TransactionIdFlushCache() is removed.
      
      2. heapam.c:
      
         T1 marked a row for update. T2 waits for T1 commit/abort.
         T1 commits. T3 updates the row before T2 locks row page.
         Now T2 sees that new row t_xmax is different from xact id (T1)
         T2 was waiting for. Old code did Assert here. New one goes to
         HeapTupleSatisfiesUpdate. Obvious changes too.
      
      3. Added Assert to vacuum.c
      4. bufmgr.c: break
         Assert(buf->r_locks == 0 && !buf->ri_lock)
         into two Asserts.
      78f7ccc9
    • T
      Fix errors in SELECT ... GROUP BY ... UNION SELECT ... · c37ecaf8
      Tom Lane 提交于
      ye proverbial one-line patch (not counting five lines of comment so's
      maybe it won't happen again)
      c37ecaf8
  5. 09 6月, 1999 11 次提交
  6. 08 6月, 1999 4 次提交
  7. 07 6月, 1999 9 次提交