1. 26 6月, 2002 1 次提交
    • B
      The attached patch fixes some spelling mistakes, makes the · ed275aea
      Bruce Momjian 提交于
      comments on one of the optimizer functions a lot more
      clear, adds a summary of the recent KSQO discussion to the
      comments in the code, adds regression tests for the bug with
      sequence state Tom fixed recently and another reg. test, and
      removes some PostQuel legacy stuff: ExecAppend -> ExecInsert,
      ExecRetrieve -> ExecSelect, etc. This was changed because the
      elog() messages from this routine are user-visible, so we
      should be using the SQL terms.
      
      Neil Conway
      ed275aea
  2. 21 6月, 2002 1 次提交
  3. 25 5月, 2002 1 次提交
    • T
      Mark index entries "killed" when they are no longer visible to any · 3f4d4880
      Tom Lane 提交于
      transaction, so as to avoid returning them out of the index AM.  Saves
      repeated heap_fetch operations on frequently-updated rows.  Also detect
      queries on unique keys (equality to all columns of a unique index), and
      don't bother continuing scan once we have found first match.
      
      Killing is implemented in the btree and hash AMs, but not yet in rtree
      or gist, because there isn't an equally convenient place to do it in
      those AMs (the outer amgetnext routine can't do it without re-pinning
      the index page).
      
      Did some small cleanup on APIs of HeapTupleSatisfies, heap_fetch, and
      index_insert to make this a little easier.
      3f4d4880
  4. 13 5月, 2002 1 次提交
  5. 28 2月, 2002 1 次提交
    • T
      Clean up BeginCommand and related routines. BeginCommand and EndCommand · 6779c55c
      Tom Lane 提交于
      are now both invoked once per received SQL command (raw parsetree) from
      pg_exec_query_string.  BeginCommand is actually just an empty routine
      at the moment --- all its former operations have been pushed into tuple
      receiver setup routines in printtup.c.  This makes for a clean distinction
      between BeginCommand/EndCommand (once per command) and the tuple receiver
      setup/teardown routines (once per ExecutorRun call), whereas the old code
      was quite ad hoc.  Along the way, clean up the calling conventions for
      ExecutorRun a little bit.
      6779c55c
  6. 20 2月, 2002 1 次提交
    • T
      A bunch of changes aimed at reducing backend startup time... · 78634044
      Tom Lane 提交于
      Improve 'pg_internal.init' relcache entry preload mechanism so that it is
      safe to use for all system catalogs, and arrange to preload a realistic
      set of system-catalog entries instead of only the three nailed-in-cache
      indexes that were formerly loaded this way.  Fix mechanism for deleting
      out-of-date pg_internal.init files: this must be synchronized with transaction
      commit, not just done at random times within transactions.  Drive it off
      relcache invalidation mechanism so that no special-case tests are needed.
      
      Cache additional information in relcache entries for indexes (their pg_index
      tuples and index-operator OIDs) to eliminate repeated lookups.  Also cache
      index opclass info at the per-opclass level to avoid repeated lookups during
      relcache load.
      
      Generalize 'systable scan' utilities originally developed by Hiroshi,
      move them into genam.c, use in a number of places where there was formerly
      ugly code for choosing either heap or index scan.  In particular this allows
      simplification of the logic that prevents infinite recursion between syscache
      and relcache during startup: we can easily switch to heapscans in relcache.c
      when and where needed to avoid recursion, so IndexScanOK becomes simpler and
      does not need any expensive initialization.
      
      Eliminate useless opening of a heapscan data structure while doing an indexscan
      (this saves an mdnblocks call and thus at least one kernel call).
      78634044
  7. 06 11月, 2001 1 次提交
  8. 28 10月, 2001 1 次提交
  9. 25 10月, 2001 1 次提交
  10. 28 5月, 2001 1 次提交
    • T
      When using a junkfilter, the output tuple should NOT be stored back into · 9e724306
      Tom Lane 提交于
      the same tuple slot that the raw tuple came from, because that slot has
      the wrong tuple descriptor.  Store it into its own slot with the correct
      descriptor, instead.  This repairs problems with SPI functions seeing
      inappropriate tuple descriptors --- for example, plpgsql code failing to
      cope with SELECT FOR UPDATE.
      9e724306
  11. 22 3月, 2001 1 次提交
  12. 29 1月, 2001 1 次提交
    • T
      Clean up handling of tuple descriptors so that result-tuple descriptors · 0d54d6ac
      Tom Lane 提交于
      allocated by plan nodes are not leaked at end of query.  This doesn't
      really matter for normal queries, but it sure does for queries invoked
      repetitively inside SQL functions.  Clean up some other grotty code
      associated with tupdescs, and fix a few other memory leaks exposed by
      tests with simple SQL functions.
      0d54d6ac
  13. 25 1月, 2001 1 次提交
  14. 22 1月, 2001 1 次提交
  15. 12 11月, 2000 1 次提交
    • T
      Restructure handling of inheritance queries so that they work with outer · 6543d81d
      Tom Lane 提交于
      joins, and clean things up a good deal at the same time.  Append plan node
      no longer hacks on rangetable at runtime --- instead, all child tables are
      given their own RT entries during planning.  Concept of multiple target
      tables pushed up into execMain, replacing bug-prone implementation within
      nodeAppend.  Planner now supports generating Append plans for inheritance
      sets either at the top of the plan (the old way) or at the bottom.  Expanding
      at the bottom is appropriate for tables used as sources, since they may
      appear inside an outer join; but we must still expand at the top when the
      target of an UPDATE or DELETE is an inheritance set, because we actually need
      a different targetlist and junkfilter for each target table in that case.
      Fortunately a target table can't be inside an outer join...  Bizarre mutual
      recursion between union_planner and prepunion.c is gone --- in fact,
      union_planner doesn't really have much to do with union queries anymore,
      so I renamed it grouping_planner.
      6543d81d
  16. 27 10月, 2000 1 次提交
  17. 13 9月, 2000 1 次提交
  18. 25 8月, 2000 1 次提交
  19. 24 8月, 2000 1 次提交
  20. 22 8月, 2000 1 次提交
  21. 06 8月, 2000 1 次提交
  22. 12 7月, 2000 1 次提交
  23. 19 6月, 2000 1 次提交
    • T
      Reimplement nodeMaterial to use a temporary BufFile (or even memory, if the · 1ee26b77
      Tom Lane 提交于
      materialized tupleset is small enough) instead of a temporary relation.
      This was something I was thinking of doing anyway for performance, and Jan
      says he needs it for TOAST because he doesn't want to cope with toasting
      noname relations.  With this change, the 'noname table' support in heap.c
      is dead code, and I have accordingly removed it.  Also clean up 'noname'
      plan handling in planner --- nonames are either sort or materialize plans,
      and it seems less confusing to handle them separately under those names.
      1ee26b77
  24. 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
  25. 29 5月, 2000 1 次提交
  26. 26 1月, 2000 1 次提交
    • B
      Add: · 5c25d602
      Bruce Momjian 提交于
        * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
      
      to all files copyright Regents of Berkeley.  Man, that's a lot of files.
      5c25d602
  27. 20 1月, 2000 1 次提交
    • T
      Fix handling of NULL constraint conditions: per SQL92 spec, a NULL result · 6d1efd76
      Tom Lane 提交于
      from a constraint condition does not violate the constraint (cf. discussion
      on pghackers 12/9/99).  Implemented by adding a parameter to ExecQual,
      specifying whether to return TRUE or FALSE when the qual result is
      really NULL in three-valued boolean logic.  Currently, ExecRelCheck is
      the only caller that asks for TRUE, but if we find any other places that
      have the wrong response to NULL, it'll be easy to fix them.
      6d1efd76
  28. 10 12月, 1999 1 次提交
  29. 31 10月, 1999 1 次提交
    • T
      Avoid duplicate ExecTypeFromTL() call in ExecInitJunkFilter() by passing · 5b9d655b
      Tom Lane 提交于
      in the TupleDesc that the caller already has (for call from ExecMain) or
      can make just as easily as ExecInitJunkFilter() can (for call from
      ExecAppend).  Also, don't bother to build a junk filter for an INSERT
      operation that doesn't actually need one, which is the normal case.
      5b9d655b
  30. 24 9月, 1999 1 次提交
    • T
      Several changes here, not very related but touching some of the same files. · e812458b
      Tom Lane 提交于
      * Buffer refcount cleanup (per my "progress report" to pghackers, 9/22).
      * Add links to backend PROC structs to sinval's array of per-backend info,
      and use these links for routines that need to check the state of all
      backends (rather than the slow, complicated search of the ShmemIndex
      hashtable that was used before).  Add databaseOID to PROC structs.
      * Use this to implement an interlock that prevents DESTROY DATABASE of
      a database containing running backends.  (It's a little tricky to prevent
      a concurrently-starting backend from getting in there, since the new
      backend is not able to lock anything at the time it tries to look up
      its database in pg_database.  My solution is to recheck that the DB is
      OK at the end of InitPostgres.  It may not be a 100% solution, but it's
      a lot better than no interlock at all...)
      * In ALTER TABLE RENAME, flush buffers for the relation before doing the
      rename of the physical files, to ensure we don't get failures later from
      mdblindwrt().
      * Update TRUNCATE patch so that it actually compiles against current
      sources :-(.
      You should do "make clean all" after pulling these changes.
      e812458b
  31. 18 7月, 1999 1 次提交
  32. 16 7月, 1999 1 次提交
  33. 15 7月, 1999 1 次提交
  34. 17 6月, 1999 1 次提交
  35. 26 5月, 1999 1 次提交
  36. 17 4月, 1999 1 次提交
  37. 14 2月, 1999 1 次提交
  38. 08 2月, 1999 2 次提交
  39. 28 11月, 1998 1 次提交