1. 08 May, 2004 1 commit
    • Tom Lane's avatar
      Get rid of rd_nblocks field in relcache entries. Turns out this was · 4af34211
      Tom Lane authored
      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
  2. 06 Apr, 2004 1 commit
  3. 10 Jan, 2004 1 commit
    • Neil Conway's avatar
      Implement "WITH / WITHOID OIDS" clause for CREATE TABLE AS. This is · 98dcf085
      Neil Conway authored
      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
  4. 07 Jan, 2004 1 commit
  5. 14 Dec, 2003 1 commit
    • Neil Conway's avatar
      I posted some bufmgr cleanup a few weeks ago, but it conflicted with · fef0c834
      Neil Conway authored
      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
  6. 29 Nov, 2003 1 commit
    • PostgreSQL Daemon's avatar
      · 969685ad
      PostgreSQL Daemon authored
      $Header: -> $PostgreSQL Changes ...
      969685ad
  7. 24 Nov, 2003 1 commit
  8. 25 Sep, 2003 1 commit
  9. 08 Aug, 2003 1 commit
  10. 04 Aug, 2003 2 commits
  11. 01 Aug, 2003 1 commit
  12. 28 Jul, 2003 1 commit
  13. 20 Jul, 2003 1 commit
  14. 12 Jun, 2003 1 commit
  15. 21 Mar, 2003 1 commit
  16. 20 Mar, 2003 3 commits
    • Bruce Momjian's avatar
      Todo items: · 5f65225f
      Bruce Momjian authored
      Add ALTER SEQUENCE to modify min/max/increment/cache/cycle values
      
      Also updated create sequence docs to mention NO MINVALUE, & NO MAXVALUE.
      
      New Files:
      doc/src/sgml/ref/alter_sequence.sgml
      src/test/regress/expected/sequence.out
      src/test/regress/sql/sequence.sql
      
      
      ALTER SEQUENCE is NOT transactional.  It behaves similarly to setval().
      It matches the proposed SQL200N spec, as well as Oracle in most ways --
      Oracle lacks RESTART WITH for some strange reason.
      
      --
      Rod Taylor <rbt@rbt.ca>
      5f65225f
    • Bruce Momjian's avatar
      > > - Move SEQ_MAXVALUE, SEQ_MINVALUE definitions to sequence.h · 8000fdd4
      Bruce Momjian authored
      > >
      > > - Add check in pg_dump to see if the value returned is the max /min
      > > values and replace with NO MAXVALUE, NO MINVALUE.
      > >
      > > - Change START and INCREMENT to use START WITH and INCREMENT BY syntax.
      > > This makes it a touch easier to port to other databases with sequences
      > > (Oracle).  PostgreSQL supports both syntaxes already.
      >
      > +       char            bufm[100],
      > +                               bufx[100];
      >
      > This seems to be an arbitary size. Why not set it to the actual maximum
      > length?
      >
      > Also:
      >
      > +       snprintf(bufm, 100, INT64_FORMAT, SEQ_MINVALUE);
      > +       snprintf(bufx, 100, INT64_FORMAT, SEQ_MAXVALUE);
      >
      > sizeof(bufm), sizeof(bufx) is probably the more
      > maintenance-friendly/standard way to do it.
      
      I changed the code to use sizeof - but will wait for a response from
      Peter before changing the size.  It's consistent throughout the sequence
      code to be 100 for this purpose.
      
      Rod Taylor <rbt@rbt.ca>
      8000fdd4
    • Bruce Momjian's avatar
      Add start time to pg_stat_activity · a1833100
      Bruce Momjian authored
      Neil Conway
      a1833100
  17. 13 Feb, 2003 1 commit
  18. 11 Nov, 2002 1 commit
    • Tom Lane's avatar
      Code review for ON COMMIT patch. Make the actual on-commit action happen · f9b5b41e
      Tom Lane authored
      before commit, not after :-( --- the original coding is not only unsafe
      if an error occurs while it's processing, but it generates an invalid
      sequence of WAL entries.  Resurrect 7.2 logic for deleting items when
      no longer needed.  Use an enum instead of random macros.  Editorialize
      on names used for routines and constants.  Teach backend/nodes routines
      about new field in CreateTable struct.  Add a regression test.
      f9b5b41e
  19. 10 Nov, 2002 1 commit
  20. 22 Sep, 2002 1 commit
  21. 04 Sep, 2002 1 commit
  22. 03 Sep, 2002 1 commit
  23. 30 Aug, 2002 1 commit
  24. 06 Aug, 2002 1 commit
    • Tom Lane's avatar
      Restructure local-buffer handling per recent pghackers discussion. · 5df307c7
      Tom Lane authored
      The local buffer manager is no longer used for newly-created relations
      (unless they are TEMP); a new non-TEMP relation goes through the shared
      bufmgr and thus will participate normally in checkpoints.  But TEMP relations
      use the local buffer manager throughout their lifespan.  Also, operations
      in TEMP relations are not logged in WAL, thus improving performance.
      Since it's no longer necessary to fsync relations as they move out of the
      local buffers into shared buffers, quite a lot of smgr.c/md.c/fd.c code
      is no longer needed and has been removed: there's no concept of a dirty
      relation anymore in md.c/fd.c, and we never fsync anything but WAL.
      Still TODO: improve local buffer management algorithms so that it would
      be reasonable to increase NLocBuffer.
      5df307c7
  25. 16 Jul, 2002 1 commit
  26. 20 Jun, 2002 1 commit
  27. 15 Jun, 2002 2 commits
  28. 22 May, 2002 1 commit
    • Tom Lane's avatar
      Modify sequence state storage to eliminate dangling-pointer problem · a2597ef1
      Tom Lane authored
      exemplified by bug #671.  Moving the storage to relcache turned out to
      be a bad idea because relcache might decide to discard the info.  Instead,
      open and close the relcache entry on each sequence operation, and use
      a record of the current XID to discover whether we already hold
      AccessShareLock on the sequence.
      a2597ef1
  29. 21 May, 2002 1 commit
    • Tom Lane's avatar
      Remove global variable scanCommandId in favor of storing a command ID · 959e61e9
      Tom Lane authored
      in snapshots, per my proposal of a few days ago.  Also, tweak heapam.c
      routines (heap_insert, heap_update, heap_delete, heap_mark4update) to
      be passed the command ID to use, instead of doing GetCurrentCommandID.
      For catalog updates they'll still get passed current command ID, but
      for updates generated from the main executor they'll get passed the
      command ID saved in the snapshot the query is using.  This should fix
      some corner cases associated with functions and triggers that advance
      current command ID while an outer query is still in progress.
      959e61e9
  30. 15 Apr, 2002 1 commit
    • Tom Lane's avatar
      The contents of command.c, creatinh.c, define.c, remove.c and rename.c · 71dc300a
      Tom Lane authored
      have been divided according to the type of object manipulated - so ALTER
      TABLE code is in tablecmds.c, aggregate commands in aggregatecmds.c and
      so on.
      
      A few common support routines remain in define.c (prototypes in
      src/include/commands/defrem.h).
      
      No code has been changed except for includes to reflect the new files.
      The prototypes for aggregatecmds.c, functioncmds.c, operatorcmds.c,
      and typecmds.c remain in src/include/commands/defrem.h.
      
      From John Gray <jgray@azuli.co.uk>
      71dc300a
  31. 30 Mar, 2002 1 commit
  32. 29 Mar, 2002 1 commit
  33. 22 Mar, 2002 1 commit
    • Tom Lane's avatar
      A little further progress on schemas: push down RangeVars into · 108a0ec8
      Tom Lane authored
      addRangeTableEntry calls.  Remove relname field from RTEs, since
      it will no longer be a useful unique identifier of relations;
      we want to encourage people to rely on the relation OID instead.
      Further work on dumping qual expressions in EXPLAIN, too.
      108a0ec8
  34. 21 Mar, 2002 2 commits
    • Tom Lane's avatar
      Change the aclchk.c routines to uniformly use OIDs to identify the · 56c9b73c
      Tom Lane authored
      objects to be privilege-checked.  Some change in their APIs would be
      necessary no matter what in the schema environment, and simply getting
      rid of the name-based interface entirely seems like the best way.
      56c9b73c
    • Tom Lane's avatar
      First phase of SCHEMA changes, concentrating on fixing the grammar and · 95ef6a34
      Tom Lane authored
      the parsetree representation.  As yet we don't *do* anything with schema
      names, just drop 'em on the floor; but you can enter schema-compatible
      command syntax, and there's even a primitive CREATE SCHEMA command.
      No doc updates yet, except to note that you can now extract a field
      from a function-returning-row's result with (foo(...)).fieldname.
      95ef6a34
  35. 15 Mar, 2002 1 commit