1. 02 Jun, 2000 1 commit
  2. 30 May, 2000 1 commit
  3. 28 May, 2000 1 commit
    • Tom Lane's avatar
      First round of changes for new fmgr interface. fmgr itself and the · 0a7fb4e9
      Tom Lane authored
      key call sites are changed, but most called functions are still oldstyle.
      An exception is that the PL managers are updated (so, for example, NULL
      handling now behaves as expected in plperl and plpgsql functions).
      NOTE initdb is forced due to added column in pg_proc.
      0a7fb4e9
  4. 21 May, 2000 1 commit
    • Tom Lane's avatar
      Repair memory leaks that caused CacheCxt to grow without bound. We · 9dab9ab5
      Tom Lane authored
      really ought to fix relcache entry construction so that it does not
      do so much with CurrentMemoryContext = CacheCxt.  As is, relatively
      harmless leaks in either sequential or index scanning translate to
      permanent leaks if they occur when called from relcache build.
      For the moment, however, the path of least resistance is to repair
      all such leaks...
      9dab9ab5
  5. 12 Apr, 2000 1 commit
  6. 31 Mar, 2000 1 commit
    • Tom Lane's avatar
      Fix low-probability bug in relcache startup: write_irels wrote the · 14bc951d
      Tom Lane authored
      pg_internal.init file in-place, which meant that if another backend
      started at about the same time, it might read the incomplete file.
      init_irels tries to guard against that, but I have now seen a crash
      due to reading bad data from a partly-written file.  (This may indicate
      a kernel bug on my platform?  Not sure.)  Anyway, clearly the safest
      course is to write the new pg_internal.init file under a unique temporary
      filename, and rename it into place only after it's all written.
      14bc951d
  7. 17 Mar, 2000 1 commit
  8. 09 Mar, 2000 1 commit
  9. 27 Feb, 2000 1 commit
  10. 18 Feb, 2000 1 commit
  11. 31 Jan, 2000 1 commit
    • Tom Lane's avatar
      Fix problems seen in parallel regress tests when SI buffer overruns (causing · a152ebee
      Tom Lane authored
      syscache and relcache flushes).  Relcache entry rebuild now preserves
      original tupledesc, rewrite rules, and triggers if possible, so that pointers
      to these things remain valid --- if these things change while relcache entry
      has positive refcount, we elog(ERROR) to avoid later crash.  Arrange for
      xact-local rels to be rebuilt when an SI inval message is seen for them,
      so that they are updated by CommandCounterIncrement the same as regular rels.
      (This is useful because of Hiroshi's recent changes to process our own SI
      messages at CommandCounterIncrement time.)  This allows simplification of
      some routines that previously hacked around the lack of an automatic update.
      catcache now keeps its own copy of tupledesc for its relation, rather than
      depending on the relcache's copy; this avoids needing to reinitialize catcache
      during a cache flush, which saves some cycles and eliminates nasty circularity
      problems that occur if a cache flush happens while trying to initialize a
      catcache.
      Eliminate a number of permanent memory leaks that used to happen during
      catcache or relcache flush; not least of which was that catcache never
      freed any cached tuples!  (Rule parsetree storage is still leaked, however;
      will fix that separately.)
      Nothing done yet about code that uses tuples retrieved by SearchSysCache
      for longer than is safe.
      a152ebee
  12. 29 Jan, 2000 1 commit
  13. 26 Jan, 2000 1 commit
    • Bruce Momjian's avatar
      Add: · 5c25d602
      Bruce Momjian authored
        * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
      
      to all files copyright Regents of Berkeley.  Man, that's a lot of files.
      5c25d602
  14. 22 Jan, 2000 1 commit
  15. 15 Jan, 2000 1 commit
  16. 30 Dec, 1999 1 commit
  17. 28 Dec, 1999 1 commit
  18. 16 Dec, 1999 1 commit
  19. 22 Nov, 1999 1 commit
  20. 21 Nov, 1999 1 commit
    • Tom Lane's avatar
      Repair problem exposed by Jan's new parallel-regression-test scaffold: · 76ccf73f
      Tom Lane authored
      inval.c thought it could safely use the catcache to look up the OIDs of
      system relations.  Not good, considering that inval.c could be called
      during catcache loading, if a shared-inval message arrives.  Rip out the
      lookup logic and instead use the known OIDs from pg_class.h.
      76ccf73f
  21. 18 Nov, 1999 1 commit
  22. 17 Nov, 1999 1 commit
  23. 16 Nov, 1999 1 commit
  24. 07 Nov, 1999 1 commit
  25. 04 Nov, 1999 1 commit
    • Hiroshi Inoue's avatar
      Make it possible to execute crashed CREATE/DROP commands again. · 2e2189a5
      Hiroshi Inoue authored
      Now indexes of pg_class and pg_type are unique indexes
      and guarantee the uniqueness of correponding attributes.
      heap_create() was changed to take another boolean parameter
      which allows to postpone the creation of disk file.
      The name of rd_nonameunlinked was changed to rd_unlinked.
      It is used generally(not only for noname relations) now.
      Requires initdb.
      2e2189a5
  26. 03 Oct, 1999 1 commit
    • Tom Lane's avatar
      Reimplement parsing and storage of default expressions and constraint · eabc714a
      Tom Lane authored
      expressions in CREATE TABLE.  There is no longer an emasculated expression
      syntax for these things; it's full a_expr for constraints, and b_expr
      for defaults (unfortunately the fact that NOT NULL is a part of the
      column constraint syntax causes a shift/reduce conflict if you try a_expr.
      Oh well --- at least parenthesized boolean expressions work now).  Also,
      stored expression for a column default is not pre-coerced to the column
      type; we rely on transformInsertStatement to do that when the default is
      actually used.  This means "f1 datetime default 'now'" behaves the way
      people usually expect it to.
      BTW, all the support code is now there to implement ALTER TABLE ADD
      CONSTRAINT and ALTER TABLE ADD COLUMN with a default value.  I didn't
      actually teach ALTER TABLE to call it, but it wouldn't be much work.
      eabc714a
  27. 18 Sep, 1999 1 commit
    • Tom Lane's avatar
      Mega-commit to make heap_open/heap_openr/heap_close take an · bd272cac
      Tom Lane authored
      additional argument specifying the kind of lock to acquire/release (or
      'NoLock' to do no lock processing).  Ensure that all relations are locked
      with some appropriate lock level before being examined --- this ensures
      that relevant shared-inval messages have been processed and should prevent
      problems caused by concurrent VACUUM.  Fix several bugs having to do with
      mismatched increment/decrement of relation ref count and mismatched
      heap_open/close (which amounts to the same thing).  A bogus ref count on
      a relation doesn't matter much *unless* a SI Inval message happens to
      arrive at the wrong time, which is probably why we got away with this
      sloppiness for so long.  Repair missing grab of AccessExclusiveLock in
      DROP TABLE, ALTER/RENAME TABLE, etc, as noted by Hiroshi.
      Recommend 'make clean all' after pulling this update; I modified the
      Relation struct layout slightly.
      Will post further discussion to pghackers list shortly.
      bd272cac
  28. 06 Sep, 1999 2 commits
  29. 04 Sep, 1999 2 commits
    • Tom Lane's avatar
      In RelationNameGetRelation(), replace temp table name by · cb36c0f6
      Tom Lane authored
      real name before doing lookup.  We only want to index temp tables by their
      real names in the relcache, to ensure there's not more than one relcache
      entry for them.
      cb36c0f6
    • Tom Lane's avatar
      Modify RelationFlushRelation so that if the relcache entry · b4a607c9
      Tom Lane authored
      has positive refcount, it is rebuilt from pg_class data.  This ensures
      that relcache entries will track changes made by other backends.  Formerly,
      a shared inval report would just be ignored if it happened to arrive while
      the relcache entry was in use.  Also, fix relcache to reset ref counts
      to zero during transaction abort.  Finally, change LockRelation() so that
      it checks for shared inval reports after obtaining the lock.  In this way,
      once any kind of lock has been obtained on a rel, we can trust the relcache
      entry to be up-to-date.
      b4a607c9
  30. 02 Sep, 1999 1 commit
    • Tom Lane's avatar
      Repair a bunch of problems in md.c. This builds on Hiroshi's · 68c32348
      Tom Lane authored
      insight that RelationFlushRelation ought to invoke smgrclose, and that the
      way to make that work is to ensure that mdclose doesn't fail if the relation
      is already closed (or unlinked, if we are looking at a DROP TABLE).  While
      I was testing that, I was able to identify several problems that we had
      with multiple-segment relations.  The system is now able to do initdb and
      pass the regression tests with a very small segment size (I had it set to
      64Kb per segment for testing).  I don't believe that ever worked before.
      File descriptor leaks seem to be gone too.
      I have partially addressed the concerns we had about mdtruncate(), too.
      On a Win32 or NFS filesystem it is not possible to unlink a file that
      another backend is holding open, so what md.c now does is to truncate
      unwanted files to zero length before trying to unlink them.  The other
      backends will be forced to close their open files by relation cache
      invalidation --- but I think it would take considerable work to make
      that happen before vacuum truncates the relation rather than after.
      Leaving zero-length files lying around seems a usable compromise.
      68c32348
  31. 17 Jul, 1999 1 commit
  32. 16 Jul, 1999 2 commits
  33. 15 Jul, 1999 2 commits
  34. 25 May, 1999 1 commit
  35. 10 May, 1999 1 commit
  36. 01 May, 1999 1 commit