Skip to content
Snippets Groups Projects
  1. Apr 02, 2006
  2. Apr 01, 2006
    • Tom Lane's avatar
      Remove the 'slow' path for btree index build, which built the btree · 89bda95d
      Tom Lane authored
      incrementally by successive inserts rather than by sorting the data.
      We were only using the slow path during bootstrap, apparently because
      when first written it failed during bootstrap --- but it works fine now
      AFAICT.  Removing it saves a hundred or so lines of code and produces
      noticeably (~10%) smaller initial states of the system catalog indexes.
      While that won't make much difference for heavily-modified catalogs,
      for the more static ones there may be a useful long-term performance
      improvement.
      89bda95d
    • Tom Lane's avatar
      Clean up WAL/buffer interactions as per my recent proposal. Get rid of the · a8b8f4db
      Tom Lane authored
      misleadingly-named WriteBuffer routine, and instead require routines that
      change buffer pages to call MarkBufferDirty (which does exactly what it says).
      We also require that they do so before calling XLogInsert; this takes care of
      the synchronization requirement documented in SyncOneBuffer.  Note that
      because bufmgr takes the buffer content lock (in shared mode) while writing
      out any buffer, it doesn't matter whether MarkBufferDirty is executed before
      the buffer content change is complete, so long as the content change is
      completed before releasing exclusive lock on the buffer.  So it's OK to set
      the dirtybit before we fill in the LSN.
      This eliminates the former kluge of needing to set the dirtybit in LockBuffer.
      Aside from making the code more transparent, we can also add some new
      debugging assertions, in particular that the caller of MarkBufferDirty must
      hold the buffer content lock, not merely a pin.
      a8b8f4db
  3. Mar 31, 2006
    • Tom Lane's avatar
      Improve gist XLOG code to follow the coding rules needed to prevent · 89395bfa
      Tom Lane authored
      torn-page problems.  This introduces some issues of its own, mainly
      that there are now some critical sections of unreasonably broad scope,
      but it's a step forward anyway.  Further cleanup will require some
      code refactoring that I'd prefer to get Oleg and Teodor involved in.
      89395bfa
    • Tom Lane's avatar
      Suppress attempts to report dropped tables to the stats collector from a · 4243f238
      Tom Lane authored
      startup or recovery process.  Since such a process isn't a real backend,
      pgstat.c gets confused.  This accounts for recent reports of strange
      "invalid server process ID -1" log messages during crash recovery.
      There isn't any point in attempting to make the report, since we'll discard
      stats in such scenarios anyhow.
      4243f238
  4. Mar 30, 2006
  5. Mar 29, 2006
  6. Mar 28, 2006
  7. Mar 25, 2006
    • Tom Lane's avatar
      Comments in IndexBuildHeapScan describe the indexing of recently-dead · 4e7d10c7
      Tom Lane authored
      tuples as needed "to keep VACUUM from complaining", but actually there is
      a more compelling reason to do it: failure to do so violates MVCC semantics.
      This is because a pre-existing serializable transaction might try to use
      the index after we finish (re)building it, and it might fail to find tuples
      it should be able to see.  We got this mostly right, but not in the case
      of partial indexes: the code mistakenly discarded recently-dead tuples for
      partial indexes.  Fix that, and adjust the comments.
      4e7d10c7
  8. Mar 24, 2006
  9. Mar 23, 2006
  10. Mar 21, 2006
  11. Mar 20, 2006
  12. Mar 19, 2006
  13. Mar 18, 2006
  14. Mar 17, 2006
  15. Mar 16, 2006
    • Tom Lane's avatar
      Fix invalid use of #if within a macro, per Laurenz Albe. Also try to · 92f5bfcc
      Tom Lane authored
      make the LDAP code's error messages look like they were written by someone
      who had heard of our style guidelines.
      92f5bfcc
    • Tom Lane's avatar
      Clean up representation of function RTEs for functions returning RECORD. · 23160139
      Tom Lane authored
      The original coding stored the raw parser output (ColumnDef and TypeName
      nodes) which was ugly, bulky, and wrong because it failed to create any
      dependency on the referenced datatype --- and in fact would not track type
      renamings and suchlike.  Instead store a list of column type OIDs in the
      RTE.
      
      Also fix up general failure of recordDependencyOnExpr to do anything sane
      about recording dependencies on datatypes.  While there are many cases where
      there will be an indirect dependency (eg if an operator returns a datatype,
      the dependency on the operator is enough), we do have to record the datatype
      as a separate dependency in examples like CoerceToDomain.
      
      initdb forced because of change of stored rules.
      23160139
  16. Mar 15, 2006
  17. Mar 14, 2006
    • Tom Lane's avatar
      Missed this file in previous commit :-( · 35b55097
      Tom Lane authored
      35b55097
    • Tom Lane's avatar
      Improve parser so that we can show an error cursor position for errors · 20ab467d
      Tom Lane authored
      during parse analysis, not only errors detected in the flex/bison stages.
      This is per my earlier proposal.  This commit includes all the basic
      infrastructure, but locations are only tracked and reported for errors
      involving column references, function calls, and operators.  More could
      be done later but this seems like a good set to start with.  I've also
      moved the ReportSyntaxErrorPosition logic out of psql and into libpq,
      which should make it available to more people --- even within psql this
      is an improvement because warnings weren't handled by ReportSyntaxErrorPosition.
      20ab467d
  18. Mar 13, 2006
    • Neil Conway's avatar
      Fix a number of syntax errors in contrib modules' uninstall scripts. · 48fb6967
      Neil Conway authored
      Most of the changes add the mandatory USING clause to DROP OPERATOR
      CLASS statements.  DROP TYPE is now DROP TYPE CASCADE; without
      CASCADE a DROP TYPE fails due to the circular dependency on the
      type's I/O functions.  The DROP FUNCTION statements for the I/O
      functions have been removed, as DROP TYPE CASCADE removes them
      automatically. Patch from Michael Fuhr.
      48fb6967
  19. Mar 11, 2006
  20. Mar 10, 2006
    • Tom Lane's avatar
      Add a CHECK_FOR_INTERRUPTS() in _bt_buildadd(). This fixes problem · 9f619249
      Tom Lane authored
      with not responding to query cancel during the last stage of btree index
      creation.
      9f619249
    • Neil Conway's avatar
      Implement 4 new aggregate functions from SQL2003. Specifically: var_pop(), · 0ebf1cc8
      Neil Conway authored
      var_samp(), stddev_pop(), and stddev_samp(). var_samp() and stddev_samp()
      are just renamings of the historical Postgres aggregates variance() and
      stddev() -- the latter names have been kept for backward compatibility.
      This patch includes updates for the documentation and regression tests.
      The catversion has been bumped.
      
      NB: SQL2003 requires that DISTINCT not be specified for any of these
      aggregates. Per discussion on -patches, I have NOT implemented this
      restriction: if the user asks for stddev(DISTINCT x), presumably they
      know what they are doing.
      0ebf1cc8
Loading