Skip to content
Snippets Groups Projects
  1. Feb 13, 2006
  2. Feb 12, 2006
  3. Feb 11, 2006
  4. Feb 10, 2006
    • Tom Lane's avatar
      Change search for default operator classes so that it examines all opclasses · 3ac1ac58
      Tom Lane authored
      regardless of the current schema search path.  Since CREATE OPERATOR CLASS
      only allows one default opclass per datatype regardless of schemas, this
      should have minimal impact, and it fixes problems with failure to find a
      desired opclass while restoring dump files.  Per discussion at
      http://archives.postgresql.org/pgsql-hackers/2006-02/msg00284.php.
      Remove now-redundant-or-unused code in typcache.c and namespace.c,
      and backpatch as far as 8.0.
      3ac1ac58
    • Bruce Momjian's avatar
      Allow psql multi-line column values to align in the proper columns · c01999a5
      Bruce Momjian authored
        If the second output column value is 'a\nb', the 'b' should appear
        in the second display column, rather than the first column as it
        does now.
      
      Change libpq's PQdsplen() to return more useful values.
      
      > Note: this changes the PQdsplen function, it can now return zero or
      > minus one which was not possible before. It doesn't appear anyone is
      > actually using the functions other than psql but it is a change. The
      > functions are not actually documentated anywhere so it's not like we're
      > breaking a defined interface. The new semantics follow the Unicode
      > standard.
      
      BACKWARD COMPATIBLE CHANGE.
      
      The only user-visible change I saw in the regression tests is that a
      SELECT * on a table where all the columns have been dropped doesn't
      return a blank line like before.  This seems like a step forward.
      
      Martijn van Oosterhout
      c01999a5
  5. Feb 09, 2006
  6. Feb 07, 2006
    • Bruce Momjian's avatar
      Source code cleanup. · ad177f10
      Bruce Momjian authored
      ad177f10
    • Bruce Momjian's avatar
      I think that NUMERIC datatype has a problem in the performance that · e7a9ccdb
      Bruce Momjian authored
      the format on Tuple(Numeric) and the format to calculate(NumericVar)
      are different. I understood that to reduce I/O. However, when many
      comparisons or calculations of NUMERIC are executed, the conversion
      of Numeric and NumericVar becomes a bottleneck.
      
      It is profile result when "create index on NUMERIC column" is executed:
      
        %   cumulative   self              self     total
       time   seconds   seconds    calls   s/call   s/call  name
       17.61     10.27    10.27 34542006     0.00     0.00  cmp_numerics
       11.90     17.21     6.94 34542006     0.00     0.00  comparetup_index
        7.42     21.54     4.33 71102587     0.00     0.00  AllocSetAlloc
        7.02     25.64     4.09 69084012     0.00     0.00  set_var_from_num
        4.87     28.48     2.84 69084012     0.00     0.00  alloc_var
        4.79     31.27     2.79 142205745     0.00     0.00  AllocSetFreeIndex
        4.55     33.92     2.65 34542004     0.00     0.00  cmp_abs
        4.07     36.30     2.38 71101189     0.00     0.00  AllocSetFree
        3.83     38.53     2.23 69084012     0.00     0.00  free_var
      
      The create index command executes many comparisons of Numeric values.
      Functions other than comparetup_index spent a lot of cycles for
      conversion from Numeric to NumericVar.
      
      An attached patch enables the comparison of Numeric values without
      executing conversion to NumericVar. The execution time of that SQL
      becomes half.
      
      o Test SQL (index_test table has 1,000,000 tuples)
       create index index_test_idx on index_test(num_col);
      
      o Test results (executed the test five times)
      (1)PentiumIII
       original: 39.789s  36.823s  36.737s  37.752s  37.019s
       patched : 18.560s  19.103s  18.830s  18.408s  18.853s
        4.07     36.30     2.38 71101189     0.00     0.00  AllocSetFree
        3.83     38.53     2.23 69084012     0.00     0.00  free_var
      
      The create index command executes many comparisons of Numeric values.
      Functions other than comparetup_index spent a lot of cycles for
      conversion from Numeric to NumericVar.
      
      An attached patch enables the comparison of Numeric values without
      executing conversion to NumericVar. The execution time of that SQL
      becomes half.
      
      o Test SQL (index_test table has 1,000,000 tuples)
       create index index_test_idx on index_test(num_col);
      
      o Test results (executed the test five times)
      (1)PentiumIII
       original: 39.789s  36.823s  36.737s  37.752s  37.019s
       patched : 18.560s  19.103s  18.830s  18.408s  18.853s
      
      (2)Pentium4
       original: 16.349s  14.997s  12.979s  13.169s  12.955s
       patched :  7.005s   6.594s   6.770s   6.740s   6.828s
      
      (3)Itanium2
       original: 15.392s  15.447s  15.350s  15.370s  15.417s
       patched :  7.413s   7.330s   7.334s   7.339s   7.339s
      
      (4)Ultra Sparc
       original: 64.435s  59.336s  59.332s  58.455s  59.781s
       patched : 28.630s  28.666s  28.983s  28.744s  28.595s
      
      Atsushi Ogawa
      e7a9ccdb
  7. Feb 04, 2006
  8. Feb 03, 2006
  9. Jan 26, 2006
  10. Jan 25, 2006
  11. Jan 23, 2006
  12. Jan 21, 2006
    • Bruce Momjian's avatar
      Add GRANT ON SEQUENCE syntax to support sequence-only permissions. · 4789e988
      Bruce Momjian authored
      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
  13. Jan 19, 2006
    • Tom Lane's avatar
      Add some test scaffolding to allow cache-flush stress testing (and I do · efbe674e
      Tom Lane authored
      mean stress ... system is orders of magnitude slower with this enabled).
      efbe674e
    • Tom Lane's avatar
      Avoid crashing if relcache flush occurs while trying to load data into an · ed69cf5d
      Tom Lane authored
      index's support-function cache (in index_getprocinfo).  Since none of that
      data can change for an index that's in active use, it seems sufficient to
      treat all open indexes the same way we were treating "nailed" system indexes
      --- that is, just re-read the pg_class row and leave the rest of the relcache
      entry strictly alone.  The pg_class re-read might not be strictly necessary
      either, but since the reltablespace and relfilenode can change in normal
      operation it seems safest to do it.  (We don't support changing any of the
      other info about an index at all, at the moment.)
      
      Back-patch as far as 8.0.  It might be possible to adapt the patch to 7.4,
      but it would take more work than I care to expend for such a low-probability
      problem.  7.3 is out of luck for sure.
      ed69cf5d
    • Tom Lane's avatar
      Fix a tiny memory leak (one List header) in RelationCacheInvalidate(). · b0be247e
      Tom Lane authored
      This is utterly insignificant in normal operation, but it becomes a
      problem during cache inval stress testing.  The original coding in fact
      had no leak --- the 8.0 List rewrite created the issue.  I wonder whether
      list_concat should pfree the discarded header?
      b0be247e
  14. Jan 18, 2006
    • Neil Conway's avatar
      Add a new system view, pg_cursors, that displays the currently available · 33e06ebc
      Neil Conway authored
      cursors. Patch from Joachim Wieland, review and ediorialization by Neil
      Conway. The view lists cursors defined by DECLARE CURSOR, using SPI, or
      via the Bind message of the frontend/backend protocol. This means the
      view does not list the unnamed portal or the portal created to implement
      EXECUTE. Because we do list SPI portals, there might be more rows in
      this view than you might expect if you are using SPI implicitly (e.g.
      via a procedural language).
      
      Per recent discussion on -hackers, the query string included in the
      view for cursors defined by DECLARE CURSOR is based on
      debug_query_string. That means it is not accurate if multiple queries
      separated by semicolons are submitted as one query string. However,
      there doesn't seem a trivial fix for that: debug_query_string
      is better than nothing. I also changed SPI_cursor_open() to include
      the source text for the portal it creates: AFAICS there is no reason
      not to do this.
      
      Update the documentation and regression tests, bump the catversion.
      33e06ebc
  15. Jan 14, 2006
  16. Jan 12, 2006
    • Neil Conway's avatar
      mbutils was previously doing some allocations, including invoking · d3a4d633
      Neil Conway authored
      fmgr_info(), in the TopMemoryContext. I couldn't see that the code
      actually leaked, but in general I think it's fragile to assume that
      pfree'ing an FmgrInfo along with its fn_extra field is enough to
      reclaim all the resources allocated by fmgr_info().  I changed the
      code to do its allocations in a new child context of
      TopMemoryContext, MbProcContext. When we want to release the
      allocations we can just reset the context, which is cleaner.
      d3a4d633
  17. Jan 11, 2006
  18. Jan 10, 2006
    • Tom Lane's avatar
      Improve patternsel() by applying the operator itself to each value · ce8fd39e
      Tom Lane authored
      listed in the column's most-common-values statistics entry.  This gives
      us an exact selectivity result for the portion of the column population
      represented by the MCV list, which can be a big leg up in accuracy if
      that's a large fraction of the population.  The heuristics involving
      pattern contents and prefix are applied only to the part of the population
      not included in the MCV list.
      ce8fd39e
  19. Jan 09, 2006
  20. Jan 08, 2006
  21. Jan 07, 2006
    • Tom Lane's avatar
      During CatCacheRemoveCList, we must now remove any members that are · 7eb54281
      Tom Lane authored
      dead and have become unreferenced.  Before 8.1, such members were left
      for AtEOXact_CatCache() to clean up, but now AtEOXact_CatCache isn't
      supposed to have anything to do.  In an assert-enabled build this bug
      leads to an assertion failure at transaction end, but in a non-assert
      build the dead member is effectively just a small memory leak.
      Per report from Jeremy Drake.
      7eb54281
  22. Jan 05, 2006
Loading