1. 28 6月, 2001 1 次提交
    • T
      Install infrastructure for shared-memory free space map. Doesn't actually · e0c9301c
      Tom Lane 提交于
      do anything yet, but it has the necessary connections to initialization
      and so forth.  Make some gestures towards allowing number of blocks in
      a relation to be BlockNumber, ie, unsigned int, rather than signed int.
      (I doubt I got all the places that are sloppy about it, yet.)  On the
      way, replace the hardwired NLOCKS_PER_XACT fudge factor with a GUC
      variable.
      e0c9301c
  2. 23 6月, 2001 1 次提交
  3. 14 6月, 2001 1 次提交
    • T
      Allow a non-superuser database owner to vacuum all tables in his · 1a6bb6d8
      Tom Lane 提交于
      database, including system catalogs (but not the shared catalogs,
      since they don't really belong to his database).  This is per recent
      mailing list discussion.  Clean up some other code that also checks
      for database ownerness by introducing a test function is_dbadmin().
      1a6bb6d8
  4. 25 5月, 2001 2 次提交
  5. 19 5月, 2001 1 次提交
  6. 17 5月, 2001 2 次提交
  7. 07 5月, 2001 1 次提交
    • T
      Rewrite of planner statistics-gathering code. ANALYZE is now available as · f905d65e
      Tom Lane 提交于
      a separate statement (though it can still be invoked as part of VACUUM, too).
      pg_statistic redesigned to be more flexible about what statistics are
      stored.  ANALYZE now collects a list of several of the most common values,
      not just one, plus a histogram (not just the min and max values).  Random
      sampling is used to make the process reasonably fast even on very large
      tables.  The number of values and histogram bins collected is now
      user-settable via an ALTER TABLE command.
      
      There is more still to do; the new stats are not being used everywhere
      they could be in the planner.  But the remaining changes for this project
      should be localized, and the behavior is already better than before.
      
      A not-very-related change is that sorting now makes use of btree comparison
      routines if it can find one, rather than invoking '<' twice.
      f905d65e
  8. 26 3月, 2001 1 次提交
  9. 22 3月, 2001 1 次提交
  10. 14 3月, 2001 1 次提交
  11. 25 1月, 2001 1 次提交
  12. 24 1月, 2001 1 次提交
  13. 20 1月, 2001 1 次提交
  14. 14 1月, 2001 1 次提交
  15. 13 1月, 2001 1 次提交
    • T
      Add more critical-section calls: all code sections that hold spinlocks · 6162432d
      Tom Lane 提交于
      are now critical sections, so as to ensure die() won't interrupt us while
      we are munging shared-memory data structures.  Avoid insecure intermediate
      states in some code that proc_exit will call, like palloc/pfree.  Rename
      START/END_CRIT_CODE to START/END_CRIT_SECTION, since that seems to be
      what people tend to call them anyway, and make them be called with () like
      a function call, in hopes of not confusing pg_indent.
      I doubt that this is sufficient to make SIGTERM safe anywhere; there's
      just too much code that could get invoked during proc_exit().
      6162432d
  16. 30 12月, 2000 1 次提交
  17. 28 12月, 2000 1 次提交
  18. 23 12月, 2000 1 次提交
    • T
      Small cleanup of temp-table handling. Disallow creation of a non-temp · 90f42847
      Tom Lane 提交于
      table that inherits from a temp table.  Make sure the right things happen
      if one creates a temp table, creates another temp that inherits from it,
      then renames the first one.  (Previously, system would end up trying to
      delete the temp tables in the wrong order.)
      90f42847
  19. 22 12月, 2000 1 次提交
    • T
      Revise lock manager to support "session level" locks as well as "transaction · 6cc842ab
      Tom Lane 提交于
      level" locks.  A session lock is not released at transaction commit (but it
      is released on transaction abort, to ensure recovery after an elog(ERROR)).
      In VACUUM, use a session lock to protect the master table while vacuuming a
      TOAST table, so that the TOAST table can be done in an independent
      transaction.
      
      I also took this opportunity to do some cleanup and renaming in the lock
      code.  The previously noted bug in ProcLockWakeup, that it couldn't wake up
      any waiters beyond the first non-wakeable waiter, is now fixed.  Also found
      a previously unknown bug of the same kind (failure to scan all members of
      a lock queue in some cases) in DeadLockCheck.  This might have led to failure
      to detect a deadlock condition, resulting in indefinite waits, but it's
      difficult to characterize the conditions required to trigger a failure.
      6cc842ab
  20. 08 12月, 2000 1 次提交
  21. 03 12月, 2000 2 次提交
  22. 30 11月, 2000 1 次提交
  23. 17 11月, 2000 1 次提交
    • T
      Change SearchSysCache coding conventions so that a reference count is · a933ee38
      Tom Lane 提交于
      maintained for each cache entry.  A cache entry will not be freed until
      the matching ReleaseSysCache call has been executed.  This eliminates
      worries about cache entries getting dropped while still in use.  See
      my posting to pg-hackers of even date for more info.
      a933ee38
  24. 16 11月, 2000 1 次提交
    • B
      Make pgsql compile on FreeBSD-alpha. · 312063c9
      Bruce Momjian 提交于
      Context diff this time.
      
      Remove -m486 compile args for FreeBSD-i386, compile -O2 on i386.
      
      Compile with only -O on alpha for codegen safety.
      
      Make the port use the TEST_AND_SET for alpha and i386 on FreeBSD.
      
      Fix a lot of bogus string formats for outputting pointers (cast to int
      and %u/%x replaced with no cast and %p), and 'Size'(size_t) are now
      cast to 'unsigned long' and output with %lu/
      
      Remove an unused variable.
      
      Alfred Perlstein
      312063c9
  25. 29 10月, 2000 1 次提交
  26. 24 10月, 2000 1 次提交
  27. 23 10月, 2000 1 次提交
  28. 17 10月, 2000 1 次提交
  29. 06 10月, 2000 1 次提交
  30. 20 9月, 2000 1 次提交
  31. 12 9月, 2000 1 次提交
    • B
      This patch implements a different "relkind" · 264c0682
      Bruce Momjian 提交于
      for views. Views are now have a "relkind" of
      RELKIND_VIEW instead of RELKIND_RELATION.
      
      Also, views no longer have actual heap storage
      files.
      
      The following changes were made
      
      1. CREATE VIEW sets the new relkind
      
      2. The executor complains if a DELETE or
              INSERT references a view.
      
      3. DROP RULE complains if an attempt is made
              to delete a view SELECT rule.
      
      4. CREATE RULE "_RETmytable" AS ON SELECT TO mytable DO INSTEAD ...
              1. checks to make sure mytable is empty.
              2. sets the relkind to RELKIND_VIEW.
              3. deletes the heap storage files.
      5. LOCK myview is not allowed. :)
      
      
      6. the regression test type_sanity was changed to
              account for the new relkind value.
      
      7. CREATE INDEX ON myview ... is not allowed.
      
      8. VACUUM myview is not allowed.
              VACUUM automatically skips views when do the entire
              database.
      
      9. TRUNCATE myview is not allowed.
      
      
      THINGS LEFT TO THINK ABOUT
      
      o pg_views
      
      o pg_dump
      
      o pgsql (\d \dv)
      o Do we really want to be able to inherit from views?
      
      o Is 'DROP TABLE myview' OK?
      
      --
      Mark Hollomon
      264c0682
  32. 06 9月, 2000 1 次提交
    • P
      Code cleanup of user name and user id handling in the backend. The current · 6dc24961
      Peter Eisentraut 提交于
      user is now defined in terms of the user id, the user name is only computed
      upon request (for display purposes). This is kind of the opposite of the
      previous state, which would maintain the user name and compute the user id
      for permission checks.
      
      Besides perhaps saving a few cycles (integer vs string), this now creates a
      single point of attack for changing the user id during a connection, for
      purposes of "setuid" functions, etc.
      6dc24961
  33. 15 7月, 2000 1 次提交
    • T
      Cleanup of code for creating index entries. Functional indexes with · 6bfe6403
      Tom Lane 提交于
      pass-by-ref data types --- eg, an index on lower(textfield) --- no longer
      leak memory during index creation or update.  Clean up a lot of redundant
      code ... did you know that copy, vacuum, truncate, reindex, extend index,
      and bootstrap each basically duplicated the main executor's logic for
      extracting information about an index and preparing index entries?
      Functional indexes should be a little faster now too, due to removal
      of repeated function lookups.
      CREATE INDEX 'opt_type' clause is deimplemented by these changes,
      but I haven't removed it from the parser yet (need to merge with
      Thomas' latest change set first).
      6bfe6403
  34. 06 7月, 2000 1 次提交
    • J
      Changed TOAST relations to have relkind RELKIND_TOASTVALUE. · 6534444d
      Jan Wieck 提交于
      Special handling of TOAST relations during VACUUM. TOAST relations
      are vacuumed while the lock on the master table is still active.
      The ANALYZE flag doesn't propagate to their vacuuming because the
      toaster access routines allways use index access ignoring stats, so
      why compute them at all.
      
      Protection of TOAST relations against normal INSERT/UPDATE/DELETE
      while offering SELECT for debugging purposes.
      
      Jan
      6534444d
  35. 28 6月, 2000 1 次提交
    • T
      First phase of memory management rewrite (see backend/utils/mmgr/README · 1aebc361
      Tom Lane 提交于
      for details).  It doesn't really do that much yet, since there are no
      short-term memory contexts in the executor, but the infrastructure is
      in place and long-term contexts are handled reasonably.  A few long-
      standing bugs have been fixed, such as 'VACUUM; anything' in a single
      query string crashing.  Also, out-of-memory is now considered a
      recoverable ERROR, not FATAL.
      Eliminate a large amount of crufty, now-dead code in and around
      memory management.
      Fix problem with holding off SIGTRAP, SIGSEGV, etc in postmaster and
      backend startup.
      1aebc361
  36. 18 6月, 2000 1 次提交
    • T
      Fix performance problems with pg_index lookups (see, for example, · d03a933e
      Tom Lane 提交于
      discussion of 5/19/00).  pg_index is now searched for indexes of a
      relation using an indexscan.  Moreover, this is done once and cached
      in the relcache entry for the relation, in the form of a list of OIDs
      for the indexes.  This list is used by the parser and executor to drive
      lookups in the pg_index syscache when they want to know the properties
      of the indexes.  Net result: index information will be fully cached
      for repetitive operations such as inserts.
      d03a933e
  37. 30 5月, 2000 1 次提交