1. 01 8月, 2006 1 次提交
    • T
      Change the relation_open protocol so that we obtain lock on a relation · 09d3670d
      Tom Lane 提交于
      (table or index) before trying to open its relcache entry.  This fixes
      race conditions in which someone else commits a change to the relation's
      catalog entries while we are in process of doing relcache load.  Problems
      of that ilk have been reported sporadically for years, but it was not
      really practical to fix until recently --- for instance, the recent
      addition of WAL-log support for in-place updates helped.
      
      Along the way, remove pg_am.amconcurrent: all AMs are now expected to support
      concurrent update.
      09d3670d
  2. 14 7月, 2006 2 次提交
  3. 12 7月, 2006 1 次提交
  4. 04 7月, 2006 1 次提交
    • T
      Code review for FILLFACTOR patch. Change WITH grammar as per earlier · b7b78d24
      Tom Lane 提交于
      discussion (including making def_arg allow reserved words), add missed
      opt_definition for UNIQUE case.  Put the reloptions support code in a less
      random place (I chose to make a new file access/common/reloptions.c).
      Eliminate header inclusion creep.  Make the index options functions safely
      user-callable (seems like client apps might like to be able to test validity
      of options before trying to make an index).  Reduce overhead for normal case
      with no options by allowing rd_options to be NULL.  Fix some unmaintainably
      klugy code, including getting rid of Natts_pg_class_fixed at long last.
      Some stylistic cleanup too, and pay attention to keeping comments in sync
      with code.
      
      Documentation still needs work, though I did fix the omissions in
      catalogs.sgml and indexam.sgml.
      b7b78d24
  5. 02 7月, 2006 1 次提交
  6. 01 4月, 2006 1 次提交
    • T
      Clean up WAL/buffer interactions as per my recent proposal. Get rid of the · a8b8f4db
      Tom Lane 提交于
      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
  7. 30 3月, 2006 1 次提交
    • T
      Clean up and document the API for XLogOpenRelation and XLogReadBuffer. · 6d61cdec
      Tom Lane 提交于
      This commit doesn't make much functional change, but it does eliminate some
      duplicated code --- for instance, PageIsNew tests are now done inside
      XLogReadBuffer rather than by each caller.
      The GIST xlog code still needs a lot of love, but I'll worry about that
      separately.
      6d61cdec
  8. 24 3月, 2006 1 次提交
    • T
      Arrange to emit a description of the current XLOG record as error context · 0a202070
      Tom Lane 提交于
      when an error occurs during xlog replay.  Also, replace the former risky
      'write into a fixed-size buffer with no overflow detection' API for XLOG
      record description routines; use an expansible StringInfo instead.  (The
      latter accounts for most of the patch bulk.)
      
      Qingqing Zhou
      0a202070
  9. 15 3月, 2006 1 次提交
    • T
      Improve parser so that we can show an error cursor position for errors · 20ab467d
      Tom Lane 提交于
      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
  10. 05 3月, 2006 1 次提交
  11. 21 1月, 2006 1 次提交
    • B
      Add GRANT ON SEQUENCE syntax to support sequence-only permissions. · 4789e988
      Bruce Momjian 提交于
      Continue to support GRANT ON [TABLE] for sequences for backward
      compatibility;  issue warning for invalid sequence permissions.
      
      [Backward compatibility warning message.]
      
      Add USAGE permission for sequences that allows only currval() and
      nextval(), not setval().
      
      Mention object name in grant/revoke warnings because of possible
      multi-object operations.
      4789e988
  12. 23 11月, 2005 1 次提交
  13. 15 10月, 2005 1 次提交
  14. 03 10月, 2005 1 次提交
    • T
      Change nextval and other sequence functions to specify their sequence · aa731ed8
      Tom Lane 提交于
      argument as a 'regclass' value instead of a text string.  The frontend
      conversion of text string to pg_class OID is now encapsulated as an
      implicitly-invocable coercion from text to regclass.  This provides
      backwards compatibility to the old behavior when the sequence argument
      is explicitly typed as 'text'.  When the argument is just an unadorned
      literal string, it will be taken as 'regclass', which means that the
      stored representation will be an OID.  This solves longstanding problems
      with renaming sequences that are referenced in default expressions, as
      well as new-in-8.1 problems with renaming such sequences' schemas or
      moving them to another schema.  All per recent discussion.
      Along the way, fix some rather serious problems in dbmirror's support
      for mirroring sequence operations (int4 vs int8 confusion for instance).
      aa731ed8
  15. 07 6月, 2005 3 次提交
  16. 27 5月, 2005 1 次提交
  17. 01 1月, 2005 1 次提交
    • P
      · 2ff50159
      PostgreSQL Daemon 提交于
      Tag appropriate files for rc3
      
      Also performed an initial run through of upgrading our Copyright date to
      extend to 2005 ... first run here was very simple ... change everything
      where: grep 1996-2004 && the word 'Copyright' ... scanned through the
      generated list with 'less' first, and after, to make sure that I only
      picked up the right entries ...
      2ff50159
  18. 14 11月, 2004 1 次提交
  19. 17 9月, 2004 1 次提交
    • T
      Restructure subtransaction handling to reduce resource consumption, · 8f9f1986
      Tom Lane 提交于
      as per recent discussions.  Invent SubTransactionIds that are managed like
      CommandIds (ie, counter is reset at start of each top transaction), and
      use these instead of TransactionIds to keep track of subtransaction status
      in those modules that need it.  This means that a subtransaction does not
      need an XID unless it actually inserts/modifies rows in the database.
      Accordingly, don't assign it an XID nor take a lock on the XID until it
      tries to do that.  This saves a lot of overhead for subtransactions that
      are only used for error recovery (eg plpgsql exceptions).  Also, arrange
      to release a subtransaction's XID lock as soon as the subtransaction
      exits, in both the commit and abort cases.  This avoids holding many
      unique locks after a long series of subtransactions.  The price is some
      additional overhead in XactLockTableWait, but that seems acceptable.
      Finally, restructure the state machine in xact.c to have a more orthogonal
      set of states for subtransactions.
      8f9f1986
  20. 29 8月, 2004 2 次提交
  21. 22 7月, 2004 1 次提交
    • T
      Invent WAL timelines, as per recent discussion, to make point-in-time · 2042b342
      Tom Lane 提交于
      recovery more manageable.  Also, undo recent change to add FILE_HEADER
      and WASTED_SPACE records to XLOG; instead make the XLOG page header
      variable-size with extra fields in the first page of an XLOG file.
      This should fix the boundary-case bugs observed by Mark Kirkwood.
      initdb forced due to change of XLOG representation.
      2042b342
  22. 12 7月, 2004 1 次提交
    • T
      Remove TABLESPACE option of CREATE SEQUENCE; sequences will now always · c14a43f6
      Tom Lane 提交于
      live in database or schema's default tablespace, as per today's discussion.
      Also, remove some unused keywords from the grammar (PATH, PENDANT,
      VERSION), and fix ALSO, which was added as a keyword but not added
      to the keyword classification lists, thus making it worse-than-reserved.
      c14a43f6
  23. 18 6月, 2004 1 次提交
    • T
      Tablespaces. Alternate database locations are dead, long live tablespaces. · 2467394e
      Tom Lane 提交于
      There are various things left to do: contrib dbsize and oid2name modules
      need work, and so does the documentation.  Also someone should think about
      COMMENT ON TABLESPACE and maybe RENAME TABLESPACE.  Also initlocation is
      dead, it just doesn't know it yet.
      
      Gavin Sherry and Tom Lane.
      2467394e
  24. 26 5月, 2004 1 次提交
    • N
      Reimplement the linked list data structure used throughout the backend. · d0b4399d
      Neil Conway 提交于
      In the past, we used a 'Lispy' linked list implementation: a "list" was
      merely a pointer to the head node of the list. The problem with that
      design is that it makes lappend() and length() linear time. This patch
      fixes that problem (and others) by maintaining a count of the list
      length and a pointer to the tail node along with each head node pointer.
      A "list" is now a pointer to a structure containing some meta-data
      about the list; the head and tail pointers in that structure refer
      to ListCell structures that maintain the actual linked list of nodes.
      
      The function names of the list API have also been changed to, I hope,
      be more logically consistent. By default, the old function names are
      still available; they will be disabled-by-default once the rest of
      the tree has been updated to use the new API names.
      d0b4399d
  25. 09 5月, 2004 1 次提交
    • T
      Get rid of rd_nblocks field in relcache entries. Turns out this was · 4af34211
      Tom Lane 提交于
      costing us lots more to maintain than it was worth.  On shared tables
      it was of exactly zero benefit because we couldn't trust it to be
      up to date.  On temp tables it sometimes saved an lseek, but not often
      enough to be worth getting excited about.  And the real problem was that
      we forced an lseek on every relcache flush in order to update the field.
      So all in all it seems best to lose the complexity.
      4af34211
  26. 07 4月, 2004 1 次提交
  27. 11 1月, 2004 1 次提交
    • N
      Implement "WITH / WITHOID OIDS" clause for CREATE TABLE AS. This is · 98dcf085
      Neil Conway 提交于
      intended to allow application authors to insulate themselves from
      changes to the default value of 'default_with_oids' in future releases
      of PostgreSQL.
      
      This patch also fixes a bug in the earlier implementation of the
      'default_with_oids' GUC variable: code in gram.y should not examine
      the value of GUC variables directly due to synchronization issues.
      98dcf085
  28. 08 1月, 2004 1 次提交
  29. 14 12月, 2003 1 次提交
    • N
      I posted some bufmgr cleanup a few weeks ago, but it conflicted with · fef0c834
      Neil Conway 提交于
      some concurrent changes Jan was making to the bufmgr. Here's an
      updated version of the patch -- it should apply cleanly to CVS
      HEAD and passes the regression tests.
      
      This patch makes the following changes:
      
           - remove the UnlockAndReleaseBuffer() and UnlockAndWriteBuffer()
             macros, and replace uses of them with calls to the appropriate
             functions.
      
           - remove a bunch of #ifdef BMTRACE code: it is ugly & broken
             (i.e. it doesn't compile)
      
           - make BufferReplace() return a bool, not an int
      
           - cleanup some logic in bufmgr.c; should be functionality
             equivalent to the previous code, just cleaner now
      
           - remove the BM_PRIVATE flag as it is unused
      
           - improve a few comments, etc.
      fef0c834
  30. 30 11月, 2003 1 次提交
    • P
      · 969685ad
      PostgreSQL Daemon 提交于
      $Header: -> $PostgreSQL Changes ...
      969685ad
  31. 25 11月, 2003 1 次提交
  32. 25 9月, 2003 1 次提交
  33. 09 8月, 2003 1 次提交
  34. 04 8月, 2003 2 次提交
  35. 01 8月, 2003 1 次提交