Skip to content
Snippets Groups Projects
  1. May 25, 2004
  2. May 23, 2004
    • Tom Lane's avatar
      Still another place to make the world safe for zero-column tables: · 27edff70
      Tom Lane authored
      remove the ancient (and always pretty dodgy) assumption in parse_clause.c
      that a query can't have an empty targetlist.
      27edff70
    • Tom Lane's avatar
      Handle impending sinval queue overflow by means of a separate signal · ebfc56d3
      Tom Lane authored
      (SIGUSR1, which we have not been using recently) instead of piggybacking
      on SIGUSR2-driven NOTIFY processing.  This has several good results:
      the processing needed to drain the sinval queue is a lot less than the
      processing needed to answer a NOTIFY; there's less contention since we
      don't have a bunch of backends all trying to acquire exclusive lock on
      pg_listener; backends that are sitting inside a transaction block can
      still drain the queue, whereas NOTIFY processing can't run if there's
      an open transaction block.  (This last is a fairly serious issue that
      I don't think we ever recognized before --- with clients like JDBC that
      tend to sit with open transaction blocks, the sinval queue draining
      mechanism never really worked as intended, probably resulting in a lot
      of useless cache-reset overhead.)  This is the last of several proposed
      changes in response to Philip Warner's recent report of sinval-induced
      performance problems.
      ebfc56d3
    • Tom Lane's avatar
      For multi-table ANALYZE, use per-table transactions when possible · 4d86ae42
      Tom Lane authored
      (ie, when not inside a transaction block), so that we can avoid holding
      locks longer than necessary.  Per trouble report from Philip Warner.
      4d86ae42
  3. May 22, 2004
    • Tom Lane's avatar
      Use wide-character library routines, if available, for upper/lower/initcap · 39838694
      Tom Lane authored
      functions.  This allows these functions to work correctly with Unicode and
      other multibyte encodings.  Per prior discussion.
      
      Also, revert my earlier change to move installation path mashing from
      Makefile.global to configure.  Turns out not to work well because configure
      script is working with unexpanded variables, and so fails to match in
      cases where it should match.
      39838694
  4. May 21, 2004
  5. May 20, 2004
  6. May 19, 2004
  7. May 18, 2004
  8. May 17, 2004
  9. May 15, 2004
  10. May 14, 2004
  11. May 12, 2004
    • Bruce Momjian's avatar
      Rename find_my_binary/find_other_binary to · b1ffacdd
      Bruce Momjian authored
      find_my_exec/find_other_exec().  Remove passing of progname to these
      functions as they can find that out from argv[0], which they already
      have.
      
      Make get_progname return const char *, and update all progname variables
      to be const char *.
      b1ffacdd
  12. May 11, 2004
    • Bruce Momjian's avatar
      As part of the work for making relocatable installs, I have re-factored · fda15b35
      Bruce Momjian authored
      all the code that looks for other binaries.  I move FindExec into
      port/exec.c (and renamed it to find_my_binary()).  I also added
      find_other_binary that looks for another binary in the same directory as
      the calling program, and checks the version string.
      
      The only behavior change was that initdb and pg_dump would look in the
      hard-coded bindir directory if it can't find the requested binary in the
      same directory as the caller.  The new code throws an error.  The old
      behavior seemed too error prone for version mismatches.
      fda15b35
    • Tom Lane's avatar
      Refactor low-level aclcheck code to provide useful interfaces for multi-bit · 5ddbe904
      Tom Lane authored
      permissions tests in about the same amount of code as before.  Exactly what
      the GRANT/REVOKE code ought to be doing is still up for debate, but this
      should be helpful in any case, and it already solves an efficiency problem
      in executor startup.
      5ddbe904
    • Tom Lane's avatar
      Promote row expressions to full-fledged citizens of the expression syntax, · 2f63232d
      Tom Lane authored
      rather than allowing them only in a few special cases as before.  In
      particular you can now pass a ROW() construct to a function that accepts
      a rowtype parameter.  Internal generation of RowExprs fixes a number of
      corner cases that used to not work very well, such as referencing the
      whole-row result of a JOIN or subquery.  This represents a further step in
      the work I started a month or so back to make rowtype values into
      first-class citizens.
      2f63232d
  13. May 08, 2004
    • Tom Lane's avatar
      Alter string format used for integer and OID lists in stored rules. · c00b3099
      Tom Lane authored
      This simplifies and speeds up the reader by letting it get the representation
      right the first time, rather than correcting it after-the-fact.  Also,
      after int and OID lists become separate node types per Neil's pending
      patch, this will let us treat these lists as just plain Nodes instead
      of requiring separate read/write macros the way we have now.
      c00b3099
    • 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
    • Tom Lane's avatar
      Get rid of cluster.c's apparatus for rebuilding a relation's indexes · dd16b7aa
      Tom Lane authored
      in favor of using the REINDEX TABLE apparatus, which does the same thing
      simpler and faster.  Also, make TRUNCATE not use cluster.c at all, but
      just assign a new relfilenode and REINDEX.  This partially addresses
      Hartmut Raschick's complaint from last December that 7.4's TRUNCATE is
      an order of magnitude slower than prior releases.  By getting rid of
      a lot of unnecessary catalog updates, these changes buy back about a
      factor of two (on my system).  The remaining overhead seems associated
      with creating and deleting storage files, which we may not be able to
      do much about without abandoning transaction safety for TRUNCATE.
      dd16b7aa
  14. May 07, 2004
    • Tom Lane's avatar
      The timezone() family of functions (a/k/a AT TIME ZONE construct) can · d9050578
      Tom Lane authored
      safely be marked immutable, since their results don't depend on the
      TimeZone GUC variable.  Per recent discussion.
      d9050578
    • Tom Lane's avatar
      Solve the 'Turkish problem' with undesirable locale behavior for case · 0bd61548
      Tom Lane authored
      conversion of basic ASCII letters.  Remove all uses of strcasecmp and
      strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp;
      remove most but not all direct uses of toupper and tolower in favor of
      pg_toupper and pg_tolower.  These functions use the same notions of
      case folding already developed for identifier case conversion.  I left
      the straight locale-based folding in place for situations where we are
      just manipulating user data and not trying to match it to built-in
      strings --- for example, the SQL upper() function is still locale
      dependent.  Perhaps this will prove not to be what's wanted, but at
      the moment we can initdb and pass regression tests in Turkish locale.
      0bd61548
  15. May 06, 2004
  16. May 05, 2004
    • Tom Lane's avatar
      Second try at a portable unsetenv(). · 9e16195f
      Tom Lane authored
      9e16195f
    • Tom Lane's avatar
      ALTER TABLE rewrite. New cool stuff: · 077db40f
      Tom Lane authored
      * ALTER ... ADD COLUMN with defaults and NOT NULL constraints works per SQL
      spec.  A default is implemented by rewriting the table with the new value
      stored in each row.
      
      * ALTER COLUMN TYPE.  You can change a column's datatype to anything you
      want, so long as you can specify how to convert the old value.  Rewrites
      the table.  (Possible future improvement: optimize no-op conversions such
      as varchar(N) to varchar(N+1).)
      
      * Multiple ALTER actions in a single ALTER TABLE command.  You can perform
      any number of column additions, type changes, and constraint additions with
      only one pass over the table contents.
      
      Basic documentation provided in ALTER TABLE ref page, but some more docs
      work is needed.
      
      Original patch from Rod Taylor, additional work from Tom Lane.
      077db40f
  17. May 02, 2004
  18. May 01, 2004
  19. Apr 30, 2004
Loading