1. 06 7月, 2004 1 次提交
  2. 01 7月, 2004 1 次提交
  3. 25 6月, 2004 1 次提交
  4. 18 6月, 2004 1 次提交
    • T
      Tablespaces. Alternate database locations are dead, long live tablespaces. · 2467394e
      Tom Lane 提交于
      There are various things left to do: contrib dbsize and oid2name modules
      need work, and so does the documentation.  Also someone should think about
      COMMENT ON TABLESPACE and maybe RENAME TABLESPACE.  Also initlocation is
      dead, it just doesn't know it yet.
      
      Gavin Sherry and Tom Lane.
      2467394e
  5. 11 6月, 2004 1 次提交
    • B
      >> It certainly doesn't. There still was a bug with the locale stuff, · 3a8cdf33
      Bruce Momjian 提交于
      >> though - the GUC variable was not set in the child
      >processes. So "show
      >> lc_collate" would *always* return "C", for example. attached
      >patch fixes
      >> this.
      >
      >Hm.  Why were these vars not propagated by the regular
      >mechanism for GUC
      >variables (write_nondefault_variables or whatever it's called)?  If the
      >problem is that it's not accepting PGC_INTERNAL values, then we need to
      >fix it there not here, because otherwise we'll have to pass all the
      >PGC_INTERNAL variables through the backend_variables file, which seems
      >like a recipe for more of the same sort of bug.
      
      
      Good point :-(
      
      I think the problem is not only that it specifically does not deal with
      PGC_INTERNAL variables. The problem is in the fact that
      write_nondefault_variables is called *before* the locale is read
      (because the locale is read from pg_control and not from any of the
      "usual" ways to read it).
      
      Attached patch is another stab at fixing it. It makes postmaster dump a
      new copy of the file once it has started the database (before it accepts
      any connections), which is when it will know about these parameters.
      Also updates the reading code to set the context to the one where the
      variable was originally set (PGC_POSTMASTER won't work for PGC_INTERNAL,
      and the other way around).
      
      We still pass lc_collate through the special file, because
      set_config_option on lc_collate will speficially *not* call setlocale(),
      and we need that call. But we no longer call set_config_option from
      there.
      
      Magnus Hagander
      3a8cdf33
  6. 03 6月, 2004 1 次提交
  7. 31 5月, 2004 1 次提交
  8. 30 5月, 2004 1 次提交
    • T
      Separate out bgwriter code into a logically separate module, rather · 076a055a
      Tom Lane 提交于
      than being random pieces of other files.  Give bgwriter responsibility
      for all checkpoint activity (other than a post-recovery checkpoint);
      so this child process absorbs the functionality of the former transient
      checkpoint and shutdown subprocesses.  While at it, create an actual
      include file for postmaster.c, which for some reason never had its own
      file before.
      076a055a
  9. 26 5月, 2004 2 次提交
    • B
      The patch adresses the TODO list item "Allow external interfaces to · 3dc37cd8
      Bruce Momjian 提交于
      extend the GUC variable set".
      
      Plugin modules like the pl<lang> modules needs a way to declare
      configuration parameters. The postmaster has no knowledge of such
      modules when it reads the postgresql.conf file. Rather than allowing
      totally unknown configuration parameters, the concept of a variable
      "class" is introduced. Variables that belongs to a declared classes will
      create a placeholder value of string type and will not generate an
      error. When a module is loaded, it will declare variables for such a
      class and make those variables "consume" any placeholders that has been
      defined. Finally, the module will generate warnings for unrecognized
      placeholders defined for its class.
      
      More detail:
      The design is outlined after the suggestions made by Tom Lane and Joe
      Conway in this thread:
      
      http://archives.postgresql.org/pgsql-hackers/2004-02/msg00229.php
      
      A new string variable 'custom_variable_classes' is introduced. This
      variable is a comma separated string of identifiers. Each identifier
      denots a 'class' that will allow its members to be added without error.
      This variable must be defined in postmaster.conf.
      
      The lexer (guc_file.l) is changed so that it can accept a qualified name
      in the form <ID>.<ID> as the name of a variable. I also changed so that
      the 'custom_variable_classes', if found, is added first of all variables
      in order to remove the order of declaration issue.
      
      The guc_variables table is made more dynamic. It is originally created
      with 20% slack and can grow dynamically. A capacity is introduced to
      avoid resizing every time a new variable is added. guc_variables and
      num_guc_variables becomes static (hidden).
      
      The GucInfoMain now uses the new function get_guc_variables() and
      GetNumConfigOptions  instead or using the guc_variables directly.
      
      The find_option() function, when passed a missing name, will check if
      the name is qualified. If the name is qualified and if the qualifier
      denotes a class included in the 'custom_variable_classes', a placeholder
      variable will be created. Such a placeholder will not participate in a
      list operation but will otherwise function as a normal string variable.
      
      Define<type>GucVariable() functions will be added, one for each variable
      type. They are inteded to be used by add-on modules like the pl<lang>
      mappings. Example:
      
      extern void DefineCustomBoolVariable(
               const char* name,
               const char* short_desc,
               const char* long_desc,
               bool* valueAddr,
               GucContext context,
               GucBoolAssignHook assign_hook,
               GucShowHook show_hook);
      
      (I created typedefs for the assign-hook and show-hook functions). A call
      to these functions will define a new GUC-variable. If a placeholder
      exists it will be replaced but it's value will be used in place of the
      default value. The valueAddr is assumed ot point at a default value when
      the define function is called. The only constraint that is imposed on a
      Custom variable is that its name is qualified.
      
      Finally, a function:
      
      void EmittWarningsOnPlacholders(const char* className)
      
      was added. This function should be called when a module has completed
      its variable definitions. At that time, no placeholders should remain
      for the class that the module uses. If they do, elog(INFO, ...) messages
      will be issued to inform the user that unrecognized variables are
      present.
      
      Thomas Hallgren
      3dc37cd8
    • N
      Reimplement the linked list data structure used throughout the backend. · d0b4399d
      Neil Conway 提交于
      In the past, we used a 'Lispy' linked list implementation: a "list" was
      merely a pointer to the head node of the list. The problem with that
      design is that it makes lappend() and length() linear time. This patch
      fixes that problem (and others) by maintaining a count of the list
      length and a pointer to the tail node along with each head node pointer.
      A "list" is now a pointer to a structure containing some meta-data
      about the list; the head and tail pointers in that structure refer
      to ListCell structures that maintain the actual linked list of nodes.
      
      The function names of the list API have also been changed to, I hope,
      be more logically consistent. By default, the old function names are
      still available; they will be disabled-by-default once the rest of
      the tree has been updated to use the new API names.
      d0b4399d
  10. 21 5月, 2004 1 次提交
  11. 08 5月, 2004 1 次提交
  12. 07 5月, 2004 3 次提交
    • B
      Remove crude test for log_statement_stats in startup code now that we · 63d01390
      Bruce Momjian 提交于
      have a more proper GUC based test.
      
      Also change error return code to ERRCODE_INVALID_PARAMETER_VALUE so it
      matches the old error return code.
      63d01390
    • B
      Throw error if log_statement_stats is used with confliction options for · ae96e629
      Bruce Momjian 提交于
      per-query stage stats.
      ae96e629
    • T
      Solve the 'Turkish problem' with undesirable locale behavior for case · 0bd61548
      Tom Lane 提交于
      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
  13. 20 4月, 2004 2 次提交
  14. 08 4月, 2004 1 次提交
  15. 07 4月, 2004 1 次提交
    • B
      > >>1. change the type of "log_statement" option from boolean to string, · 6a25c6e1
      Bruce Momjian 提交于
      > >>with allowed values of "all, mod, ddl, none" with default "none".
      
      OK, here is a patch that implements #1.  Here is sample output:
      
              test=> set client_min_messages = 'log';
              SET
              test=> set log_statement = 'mod';
              SET
              test=> select 1;
               ?column?
              ----------
                      1
              (1 row)
      
              test=> update test set x=1;
              LOG:  statement: update test set x=1;
              ERROR:  relation "test" does not exist
              test=> update test set x=1;
              LOG:  statement: update test set x=1;
              ERROR:  relation "test" does not exist
              test=> copy test from '/tmp/x';
              LOG:  statement: copy test from '/tmp/x';
              ERROR:  relation "test" does not exist
              test=> copy test to  '/tmp/x';
              ERROR:  relation "test" does not exist
              test=> prepare xx as select 1;
              PREPARE
              test=> prepare xx as update x set y=1;
              LOG:  statement: prepare xx as update x set y=1;
              ERROR:  relation "x" does not exist
              test=> explain analyze select 1;;
                                                   QUERY PLAN
              ------------------------------------------------------------------------------------
               Result  (cost=0.00..0.01 rows=1 width=0) (actual time=0.006..0.007 rows=1 loops=1)
               Total runtime: 0.046 ms
              (2 rows)
      
              test=> explain analyze update test set x=1;
              LOG:  statement: explain analyze update test set x=1;
              ERROR:  relation "test" does not exist
              test=> explain update test set x=1;
              ERROR:  relation "test" does not exist
      
      It checks PREPARE and EXECUTE ANALYZE too.  The log_statement values are
      'none', 'mod', 'ddl', and 'all'.  For 'all', it prints before the query
      is parsed, and for ddl/mod, it does it right after parsing using the
      node tag (or command tag for CREATE/ALTER/DROP), so any non-parse errors
      will print after the log line.
      6a25c6e1
  16. 05 4月, 2004 2 次提交
  17. 02 4月, 2004 1 次提交
    • T
      Replace TupleTableSlot convention for whole-row variables and function · 375369ac
      Tom Lane 提交于
      results with tuples as ordinary varlena Datums.  This commit does not
      in itself do much for us, except eliminate the horrid memory leak
      associated with evaluation of whole-row variables.  However, it lays the
      groundwork for allowing composite types as table columns, and perhaps
      some other useful features as well.  Per my proposal of a few days ago.
      375369ac
  18. 01 4月, 2004 1 次提交
  19. 25 3月, 2004 1 次提交
  20. 24 3月, 2004 1 次提交
  21. 23 3月, 2004 1 次提交
  22. 22 3月, 2004 1 次提交
  23. 19 3月, 2004 1 次提交
  24. 15 3月, 2004 1 次提交
  25. 09 3月, 2004 1 次提交
    • B
      Add: · 2d3fe86b
      Bruce Momjian 提交于
      #log_line_prefix = ''         # e.g. '<%u%%%d> '
                                    # %u=user name %d=database name
                                    # %r=remote host and port
                                    # %p=PID %t=timestamp %i=command tag
                                    # %c=session id %l=session line number
                                    # %s=session start timestamp
                                    # %x=stop here in non-session processes
                                    # %%='%'
      
      Andrew Dunstan
      2d3fe86b
  26. 25 2月, 2004 1 次提交
  27. 24 2月, 2004 1 次提交
  28. 23 2月, 2004 1 次提交
  29. 17 2月, 2004 2 次提交
  30. 07 2月, 2004 1 次提交
  31. 04 2月, 2004 2 次提交
  32. 02 2月, 2004 1 次提交
  33. 31 1月, 2004 1 次提交
    • N
      Micro-opt: replace calls like · 7b2cf171
      Neil Conway 提交于
          appendStringInfo(buf, "%s", str);
      with
          appendStringInfoString(buf, str);
      as the latter form is slightly faster.
      7b2cf171