1. 19 9月, 2006 5 次提交
  2. 18 9月, 2006 2 次提交
    • T
      bcbb402e
    • T
      Change ANALYZE to take ShareUpdateExclusiveLock not AccessShareLock on · da7540b9
      Tom Lane 提交于
      the table being analyzed.  This prevents two ANALYZEs from running
      concurrently on the same table and possibly suffering concurrent-update
      failures while trying to store their results into pg_statistic.  The
      downside is that a database-wide ANALYZE executed within a transaction
      block will hold ShareUpdateExclusiveLock on many tables simultaneously,
      which could lead to concurrency issues or even deadlock against another
      such ANALYZE.  However, this seems a corner case of less importance
      than getting unexpected errors from a foreground ANALYZE when autovacuum
      elects to analyze the same table concurrently.  Per discussion.
      da7540b9
  3. 17 9月, 2006 2 次提交
  4. 16 9月, 2006 3 次提交
  5. 15 9月, 2006 4 次提交
  6. 14 9月, 2006 3 次提交
  7. 11 9月, 2006 3 次提交
  8. 10 9月, 2006 2 次提交
  9. 08 9月, 2006 2 次提交
    • T
      Tweak the behavior of log_duration as proposed by Guillaume Smet: rather · b59d31c2
      Tom Lane 提交于
      than being equivalent to setting log_min_duration_statement to zero, this
      option now forces logging of all query durations, but doesn't force logging
      of query text.  Also, add duration logging coverage for fastpath function
      calls.
      b59d31c2
    • T
      Clean up logging for extended-query-protocol operations, as per my recent · 893632be
      Tom Lane 提交于
      proposal.  Parameter logging works even for binary-format parameters, and
      logging overhead is avoided when disabled.
      
      log_statement = all output for the src/test/examples/testlibpq3.c example
      now looks like
      
      LOG:  statement: execute <unnamed>: SELECT * FROM test1 WHERE t = $1
      DETAIL:  parameters: $1 = 'joe''s place'
      LOG:  statement: execute <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
      DETAIL:  parameters: $1 = '2'
      
      and log_min_duration_statement = 0 results in
      
      LOG:  duration: 2.431 ms  parse <unnamed>: SELECT * FROM test1 WHERE t = $1
      LOG:  duration: 2.335 ms  bind <unnamed> to <unnamed>: SELECT * FROM test1 WHERE t = $1
      DETAIL:  parameters: $1 = 'joe''s place'
      LOG:  duration: 0.394 ms  execute <unnamed>: SELECT * FROM test1 WHERE t = $1
      DETAIL:  parameters: $1 = 'joe''s place'
      LOG:  duration: 1.251 ms  parse <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
      LOG:  duration: 0.566 ms  bind <unnamed> to <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
      DETAIL:  parameters: $1 = '2'
      LOG:  duration: 0.173 ms  execute <unnamed>: SELECT * FROM test1 WHERE i = $1::int4
      DETAIL:  parameters: $1 = '2'
      
      (This example demonstrates the folly of ignoring parse/bind steps for duration
      logging purposes, BTW.)
      
      Along the way, create a less ad-hoc mechanism for determining which commands
      are logged by log_statement = mod and log_statement = ddl.  The former coding
      was actually missing quite a few things that look like ddl to me, and it
      did not handle EXECUTE or extended query protocol correctly at all.
      
      This commit does not do anything about the question of whether log_duration
      should be removed or made less redundant with log_min_duration_statement.
      893632be
  10. 07 9月, 2006 3 次提交
  11. 06 9月, 2006 1 次提交
    • T
      Get rid of the separate RULE privilege for tables: now only a table's owner · 7bae5a28
      Tom Lane 提交于
      can create or modify rules for the table.  Do setRuleCheckAsUser() while
      loading rules into the relcache, rather than when defining a rule.  This
      ensures that permission checks for tables referenced in a rule are done with
      respect to the current owner of the rule's table, whereas formerly ALTER TABLE
      OWNER would fail to update the permission checking for associated rules.
      Removal of separate RULE privilege is needed to prevent various scenarios
      in which a grantee of RULE privilege could effectively have any privilege
      of the table owner.  For backwards compatibility, GRANT/REVOKE RULE is still
      accepted, but it doesn't do anything.  Per discussion here:
      http://archives.postgresql.org/pgsql-hackers/2006-04/msg01138.php
      7bae5a28
  12. 05 9月, 2006 5 次提交
  13. 04 9月, 2006 4 次提交
  14. 03 9月, 2006 1 次提交