1. 03 Jan, 2007 4 commits
    • Tom Lane's avatar
      Clean up smgr.c/md.c APIs as per discussion a couple months ago. Instead of · ef072219
      Tom Lane authored
      having md.c return a success/failure boolean to smgr.c, which was just going
      to elog anyway, let md.c issue the elog messages itself.  This allows better
      error reporting, particularly in cases such as "short read" or "short write"
      which Peter was complaining of.  Also, remove the kluge of allowing mdread()
      to return zeroes from a read-beyond-EOF: this is now an error condition
      except when InRecovery or zero_damaged_pages = true.  (Hash indexes used to
      require that behavior, but no more.)  Also, enforce that mdwrite() is to be
      used for rewriting existing blocks while mdextend() is to be used for
      extending the relation EOF.  This restriction lets us get rid of the old
      ad-hoc defense against creating huge files by an accidental reference to
      a bogus block number: we'll only create new segments in mdextend() not
      mdwrite() or mdread().  (Again, when InRecovery we allow it anyway, since
      we need to allow updates of blocks that were later truncated away.)
      Also, clean up the original makeshift patch for bug #2737: move the
      responsibility for padding relation segments to full length into md.c.
      ef072219
    • Bruce Momjian's avatar
      Attempt to return proper overflow/underflow messages for platforms that · 990fea84
      Bruce Momjian authored
      only return Nan and set errno for pow/exp overflow/underflow.
      990fea84
    • Bruce Momjian's avatar
      For float4/8, remove errno checks for pow() and exp() because only some · ada6fd63
      Bruce Momjian authored
      platforms set errno, and we already have a check macro that detects
      under/overflow, so there is no reason for platform-specific code
      anymore.
      ada6fd63
    • D'Arcy J.M. Cain's avatar
      Widen the money type to 64 bits. · 74a40190
      D'Arcy J.M. Cain authored
      74a40190
  2. 02 Jan, 2007 8 commits
  3. 31 Dec, 2006 1 commit
    • Tom Lane's avatar
      Found the problem with my operator-family changes: by fetching from · 0b56be83
      Tom Lane authored
      pg_opclass during LookupOpclassInfo(), I'd turned pg_opclass_oid_index
      into a critical system index.  However the problem could only manifest
      during a backend's first attempt to load opclass data, and then only
      if it had successfully loaded pg_internal.init and subsequently received
      a relcache flush; which made it impossible to reproduce in sequential
      tests and darn hard even in parallel tests.  Memo to self: when
      exercising cache flush scenarios, must disable LookupOpclassInfo's
      internal cache too.
      0b56be83
  4. 30 Dec, 2006 2 commits
  5. 29 Dec, 2006 3 commits
  6. 28 Dec, 2006 11 commits
  7. 27 Dec, 2006 7 commits
  8. 26 Dec, 2006 4 commits
    • Tom Lane's avatar
      Fix failure due to accessing an already-freed tuple descriptor in a plan · 0cbc5b1e
      Tom Lane authored
      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
    • Tom Lane's avatar
      Repair bug #2839: the various ExecReScan functions need to reset · 68996463
      Tom Lane authored
      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
    • Tom Lane's avatar
      Repair bug #2836: SPI_execute_plan returned zero if none of the querytrees · fccf99f0
      Tom Lane authored
      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
    • Tom Lane's avatar
      4a836bad