1. 21 7月, 2011 1 次提交
    • R
      Support SECURITY LABEL on databases, tablespaces, and roles. · 463f2625
      Robert Haas 提交于
      This requires a new shared catalog, pg_shseclabel.
      
      Along the way, fix the security_label regression tests so that they
      don't monkey with the labels of any pre-existing objects.  This is
      unlikely to matter in practice, since only the label for the "dummy"
      provider was being manipulated.  But this way still seems cleaner.
      
      KaiGai Kohei, with fairly extensive hacking by me.
      463f2625
  2. 10 4月, 2011 1 次提交
  3. 07 4月, 2011 1 次提交
    • T
      Revise the API for GUC variable assign hooks. · 2594cf0e
      Tom Lane 提交于
      The previous functions of assign hooks are now split between check hooks
      and assign hooks, where the former can fail but the latter shouldn't.
      Aside from being conceptually clearer, this approach exposes the
      "canonicalized" form of the variable value to guc.c without having to do
      an actual assignment.  And that lets us fix the problem recently noted by
      Bernd Helmle that the auto-tune patch for wal_buffers resulted in bogus
      log messages about "parameter "wal_buffers" cannot be changed without
      restarting the server".  There may be some speed advantage too, because
      this design lets hook functions avoid re-parsing variable values when
      restoring a previous state after a rollback (they can store a pre-parsed
      representation of the value instead).  This patch also resolves a
      longstanding annoyance about custom error messages from variable assign
      hooks: they should modify, not appear separately from, guc.c's own message
      about "invalid parameter value".
      2594cf0e
  4. 02 1月, 2011 1 次提交
  5. 14 12月, 2010 1 次提交
    • R
      Generalize concept of temporary relations to "relation persistence". · 5f7b58fa
      Robert Haas 提交于
      This commit replaces pg_class.relistemp with pg_class.relpersistence;
      and also modifies the RangeVar node type to carry relpersistence rather
      than istemp.  It also removes removes rd_istemp from RelationData and
      instead performs the correct computation based on relpersistence.
      
      For clarity, we add three new macros: RelationNeedsWAL(),
      RelationUsesLocalBuffers(), and RelationUsesTempNamespace(), so that we
      can clarify the purpose of each check that previous depended on
      rd_istemp.
      
      This is intended as infrastructure for the upcoming unlogged tables
      patch, as well as for future possible work on global temporary tables.
      5f7b58fa
  6. 11 12月, 2010 1 次提交
    • T
      Use symbolic names not octal constants for file permission flags. · 04f4e10c
      Tom Lane 提交于
      Purely cosmetic patch to make our coding standards more consistent ---
      we were doing symbolic some places and octal other places.  This patch
      fixes all C-coded uses of mkdir, chmod, and umask.  There might be some
      other calls I missed.  Inconsistency noted while researching tablespace
      directory permissions issue.
      04f4e10c
  7. 26 11月, 2010 1 次提交
    • R
      Object access hook framework, with post-creation hook. · cc1ed40d
      Robert Haas 提交于
      After a SQL object is created, we provide an opportunity for security
      or logging plugins to get control; for example, a security label provider
      could use this to assign an initial security label to newly created
      objects.  The basic infrastructure is (hopefully) reusable for other types
      of events that might require similar treatment.
      
      KaiGai Kohei, with minor adjustments.
      cc1ed40d
  8. 24 11月, 2010 1 次提交
  9. 21 9月, 2010 1 次提交
  10. 05 8月, 2010 1 次提交
    • R
      Standardize get_whatever_oid functions for object types with · 2a6ef344
      Robert Haas 提交于
      unqualified names.
      
      - Add a missing_ok parameter to get_tablespace_oid.
      - Avoid duplicating get_tablespace_od guts in objectNamesToOids.
      - Add a missing_ok parameter to get_database_oid.
      - Replace get_roleid and get_role_checked with get_role_oid.
      - Add get_namespace_oid, get_language_oid, get_am_oid.
      - Refactor existing code to use new interfaces.
      
      Thanks to KaiGai Kohei for the review.
      2a6ef344
  11. 21 7月, 2010 1 次提交
  12. 18 7月, 2010 1 次提交
  13. 07 7月, 2010 1 次提交
  14. 02 7月, 2010 1 次提交
  15. 26 2月, 2010 1 次提交
  16. 17 2月, 2010 1 次提交
  17. 14 1月, 2010 1 次提交
    • S
      First part of refactoring of code for ResolveRecoveryConflict. Purposes · e99767bc
      Simon Riggs 提交于
      of this are to centralise the conflict code to allow further change,
      as well as to allow passing through the full reason for the conflict
      through to the conflicting backends. Backend state alters how we
      can handle different types of conflict so this is now required.
      As originally suggested by Heikki, no longer optional.
      e99767bc
  18. 12 1月, 2010 1 次提交
  19. 07 1月, 2010 3 次提交
  20. 06 1月, 2010 2 次提交
    • B
      Use OIDCHARS: · 5c82ccb1
      Bruce Momjian 提交于
      Use OIDCHARS for oid character length, rather than '10', in tablespace
      code.
      5c82ccb1
    • R
      Support ALTER TABLESPACE name SET/RESET ( tablespace_options ). · d86d51a9
      Robert Haas 提交于
      This patch only supports seq_page_cost and random_page_cost as parameters,
      but it provides the infrastructure to scalably support many more.
      In particular, we may want to add support for effective_io_concurrency,
      but I'm leaving that as future work for now.
      
      Thanks to Tom Lane for design help and Alvaro Herrera for the review.
      d86d51a9
  21. 03 1月, 2010 1 次提交
  22. 19 12月, 2009 1 次提交
    • S
      Allow read only connections during recovery, known as Hot Standby. · efc16ea5
      Simon Riggs 提交于
      Enabled by recovery_connections = on (default) and forcing archive recovery using a recovery.conf. Recovery processing now emulates the original transactions as they are replayed, providing full locking and MVCC behaviour for read only queries. Recovery must enter consistent state before connections are allowed, so there is a delay, typically short, before connections succeed. Replay of recovering transactions can conflict and in some cases deadlock with queries during recovery; these result in query cancellation after max_standby_delay seconds have expired. Infrastructure changes have minor effects on normal running, though introduce four new types of WAL record.
      
      New test mode "make standbycheck" allows regression tests of static command behaviour on a standby server while in recovery. Typical and extreme dynamic behaviours have been checked via code inspection and manual testing. Few port specific behaviours have been utilised, though primary testing has been on Linux only so far.
      
      This commit is the basic patch. Additional changes will follow in this release to enhance some aspects of behaviour, notably improved handling of conflicts, deadlock detection and query cancellation. Changes to VACUUM FULL are also required.
      
      Simon Riggs, with significant and lengthy review by Heikki Linnakangas, including streamlined redesign of snapshot creation and two-phase commit.
      
      Important contributions from Florian Pflug, Mark Kirkwood, Merlin Moncure, Greg Stark, Gianni Ciolli, Gabriele Bartolini, Hannu Krosing, Robert Haas, Tatsuo Ishii, Hiroyuki Yamada plus support and feedback from many other community members.
      efc16ea5
  23. 11 11月, 2009 1 次提交
    • T
      Revert the temporary patch to work around Snow Leopard readdir() bug. · 21e3edd6
      Tom Lane 提交于
      Apple has fixed that bug in 10.6.2, and we should encourage users to
      update to that version rather than trusting this cosmetic patch.
      As was recently noted by Stephen Tyler, this patch was only masking
      the problem in the context of DROP TABLESPACE, but the failure could
      occur in other places such as pg_xlog cleanup.
      21e3edd6
  24. 12 9月, 2009 1 次提交
  25. 23 1月, 2009 1 次提交
  26. 21 1月, 2009 1 次提交
  27. 02 1月, 2009 1 次提交
  28. 02 11月, 2008 1 次提交
    • T
      Remove all uses of the deprecated functions heap_formtuple, heap_modifytuple, · 902d1cb3
      Tom Lane 提交于
      and heap_deformtuple in favor of the newer functions heap_form_tuple et al
      (which do the same things but use bool control flags instead of arbitrary
      char values).  Eliminate the former duplicate coding of these functions,
      reducing the deprecated functions to mere wrappers around the newer ones.
      We can't get rid of them entirely because add-on modules probably still
      contain many instances of the old coding style.
      
      Kris Jurka
      902d1cb3
  29. 19 6月, 2008 1 次提交
  30. 12 5月, 2008 1 次提交
    • A
      Restructure some header files a bit, in particular heapam.h, by removing some · f8c4d7db
      Alvaro Herrera 提交于
      unnecessary #include lines in it.  Also, move some tuple routine prototypes and
      macros to htup.h, which allows removal of heapam.h inclusion from some .c
      files.
      
      For this to work, a new header file access/sysattr.h needed to be created,
      initially containing attribute numbers of system columns, for pg_dump usage.
      
      While at it, make contrib ltree, intarray and hstore header files more
      consistent with our header style.
      f8c4d7db
  31. 27 3月, 2008 1 次提交
  32. 26 3月, 2008 1 次提交
    • T
      Simplify and standardize conversions between TEXT datums and ordinary C · 220db7cc
      Tom Lane 提交于
      strings.  This patch introduces four support functions cstring_to_text,
      cstring_to_text_with_len, text_to_cstring, and text_to_cstring_buffer, and
      two macros CStringGetTextDatum and TextDatumGetCString.  A number of
      existing macros that provided variants on these themes were removed.
      
      Most of the places that need to make such conversions now require just one
      function or macro call, in place of the multiple notational layers that used
      to be needed.  There are no longer any direct calls of textout or textin,
      and we got most of the places that were using handmade conversions via
      memcpy (there may be a few still lurking, though).
      
      This commit doesn't make any serious effort to eliminate transient memory
      leaks caused by detoasting toasted text objects before they reach
      text_to_cstring.  We changed PG_GETARG_TEXT_P to PG_GETARG_TEXT_PP in a few
      places where it was easy, but much more could be done.
      
      Brendan Jurd and Tom Lane
      220db7cc
  33. 02 1月, 2008 1 次提交
  34. 28 12月, 2007 1 次提交
    • T
      Improve consistency of error reporting in GUC assign_hook routines. Some · 5233dc15
      Tom Lane 提交于
      were reporting ERROR for interactive assignments and LOG for other cases,
      some were saying nothing for non-interactive cases, and a few did yet other
      things.  Make them use a new function GUC_complaint_elevel() to establish
      a reasonably uniform policy about how to report.  There are still a few
      edge cases such as assign_search_path(), but it's much better than before.
      Per gripe from Devrim Gunduz and subsequent discussion.
      
      As noted by Alvaro, it'd be better to fold these custom messages into the
      standard "invalid parameter value" complaint from guc.c, perhaps as the DETAIL
      field.  However that will require more redesign than seems prudent for 8.3.
      This is a relatively safe, low-impact change that we can afford to risk now.
      5233dc15
  35. 16 11月, 2007 2 次提交
    • B
      pgindent run for 8.3. · fdf5a5ef
      Bruce Momjian 提交于
      fdf5a5ef
    • T
      Prevent re-use of a deleted relation's relfilenode until after the next · 6cc4451b
      Tom Lane 提交于
      checkpoint.  This guards against an unlikely data-loss scenario in which
      we re-use the relfilenode, then crash, then replay the deletion and
      recreation of the file.  Even then we'd be OK if all insertions into the
      new relation had been WAL-logged ... but that's not guaranteed given all
      the no-WAL-logging optimizations that have recently been added.
      
      Patch by Heikki Linnakangas, per a discussion last month.
      6cc4451b
  36. 02 8月, 2007 1 次提交