Skip to content
Snippets Groups Projects
  1. May 08, 2015
    • Andres Freund's avatar
      Represent columns requiring insert and update privileges indentently. · 2c8f4836
      Andres Freund authored
      Previously, relation range table entries used a single Bitmapset field
      representing which columns required either UPDATE or INSERT privileges,
      despite the fact that INSERT and UPDATE privileges are separately
      cataloged, and may be independently held.  As statements so far required
      either insert or update privileges but never both, that was
      sufficient. The required permission could be inferred from the top level
      statement run.
      
      The upcoming INSERT ... ON CONFLICT UPDATE feature needs to
      independently check for both privileges in one statement though, so that
      is not sufficient anymore.
      
      Bumps catversion as stored rules change.
      
      Author: Peter Geoghegan
      Reviewed-By: Andres Freund
      2c8f4836
  2. Mar 11, 2015
  3. Jan 06, 2015
  4. Nov 28, 2014
    • Tom Lane's avatar
      Add bms_next_member(), and use it where appropriate. · f4e031c6
      Tom Lane authored
      This patch adds a way of iterating through the members of a bitmapset
      nondestructively, unlike the old way with bms_first_member().  While
      bms_next_member() is very slightly slower than bms_first_member()
      (at least for typical-size bitmapsets), eliminating the need to palloc
      and pfree a temporary copy of the target bitmapset is a significant win.
      So this method should be preferred in all cases where a temporary copy
      would be necessary.
      
      Tom Lane, with suggestions from Dean Rasheed and David Rowley
      f4e031c6
  5. Jul 14, 2014
  6. May 06, 2014
    • Bruce Momjian's avatar
      pgindent run for 9.4 · 0a783200
      Bruce Momjian authored
      This includes removing tabs after periods in C comments, which was
      applied to back branches, so this change should not effect backpatching.
      0a783200
  7. Apr 01, 2014
  8. Jan 07, 2014
  9. Jul 02, 2013
    • Robert Haas's avatar
      Use an MVCC snapshot, rather than SnapshotNow, for catalog scans. · 568d4138
      Robert Haas authored
      SnapshotNow scans have the undesirable property that, in the face of
      concurrent updates, the scan can fail to see either the old or the new
      versions of the row.  In many cases, we work around this by requiring
      DDL operations to hold AccessExclusiveLock on the object being
      modified; in some cases, the existing locking is inadequate and random
      failures occur as a result.  This commit doesn't change anything
      related to locking, but will hopefully pave the way to allowing lock
      strength reductions in the future.
      
      The major issue has held us back from making this change in the past
      is that taking an MVCC snapshot is significantly more expensive than
      using a static special snapshot such as SnapshotNow.  However, testing
      of various worst-case scenarios reveals that this problem is not
      severe except under fairly extreme workloads.  To mitigate those
      problems, we avoid retaking the MVCC snapshot for each new scan;
      instead, we take a new snapshot only when invalidation messages have
      been processed.  The catcache machinery already requires that
      invalidation messages be sent before releasing the related heavyweight
      lock; else other backends might rely on locally-cached data rather
      than scanning the catalog at all.  Thus, making snapshot reuse
      dependent on the same guarantees shouldn't break anything that wasn't
      already subtly broken.
      
      Patch by me.  Review by Michael Paquier and Andres Freund.
      568d4138
  10. May 29, 2013
  11. Apr 28, 2013
    • Tom Lane's avatar
      Editorialize a bit on new ProcessUtility() API. · f8db76e8
      Tom Lane authored
      Choose a saner ordering of parameters (adding a new input param after
      the output params seemed a bit random), update the function's header
      comment to match reality (cmon folks, is this really that hard?),
      get rid of useless and sloppily-defined distinction between
      PROCESS_UTILITY_SUBCOMMAND and PROCESS_UTILITY_GENERATED.
      f8db76e8
  12. Apr 17, 2013
  13. Apr 12, 2013
  14. Apr 05, 2013
  15. Mar 28, 2013
    • Robert Haas's avatar
      Allow sepgsql labels to depend on object name. · 0f05840b
      Robert Haas authored
      The main change here is to call security_compute_create_name_raw()
      rather than security_compute_create_raw().  This ups the minimum
      requirement for libselinux from 2.0.99 to 2.1.10, but it looks
      like most distributions will have picked that up before 9.3 is out.
      
      KaiGai Kohei
      0f05840b
  16. Mar 27, 2013
  17. Jan 01, 2013
  18. Oct 23, 2012
    • Alvaro Herrera's avatar
      Add context info to OAT_POST_CREATE security hook · f4c4335a
      Alvaro Herrera authored
      ... and have sepgsql use it to determine whether to check permissions
      during certain operations.  Indexes that are being created as a result
      of REINDEX, for instance, do not need to have their permissions checked;
      they were already checked when the index was created.
      
      Author: KaiGai Kohei, slightly revised by me
      f4c4335a
  19. Sep 05, 2012
    • Robert Haas's avatar
      sepgsql cleanups. · aa2b237c
      Robert Haas authored
      This is needed to match recent changes elsewhere.  Along the way, some
      renaming for clarity.
      
      KaiGai Kohei
      aa2b237c
  20. Jul 05, 2012
  21. Jun 10, 2012
  22. May 22, 2012
    • Robert Haas's avatar
      Fix error message for COMMENT/SECURITY LABEL ON COLUMN xxx IS 'yyy' · 8fbe5a31
      Robert Haas authored
      When the column name is an unqualified name, rather than table.column,
      the error message complains about too many dotted names, which is
      wrong.  Report by Peter Eisentraut based on examination of the
      sepgsql regression test output, but the problem also affects COMMENT.
      New wording as suggested by Tom Lane.
      8fbe5a31
  23. May 02, 2012
  24. Apr 24, 2012
  25. Mar 15, 2012
    • Robert Haas's avatar
      sepgsql_setcon(). · 523176cb
      Robert Haas authored
      This is intended as infrastructure to allow sepgsql to cooperate with
      connection pooling software, by allowing the effective security label
      to be set for each new connection.
      
      KaiGai Kohei, reviewed by Yeb Havinga.
      523176cb
  26. Mar 09, 2012
  27. Feb 15, 2012
    • Robert Haas's avatar
      sepgsql: Move some code from hooks.c to label.c · d44a3fb5
      Robert Haas authored
      This is some preliminary refactoring related to a pending patch
      to allow sepgsql-enable sessions to make dynamic label transitions.
      But this commit doesn't involve any functional change: it just puts
      some bits of code in more logical places.
      
      KaiGai Kohei
      d44a3fb5
  28. Jan 02, 2012
  29. Dec 21, 2011
  30. Sep 28, 2011
    • Tom Lane's avatar
      Take sepgsql regression tests out of the regular regression test mechanism. · cc4ff874
      Tom Lane authored
      Because these tests require root privileges, not to mention invasive
      changes to the security configuration of the host system, it's not
      reasonable for them to be invoked by a regular "make check" or "make
      installcheck".  Instead, dike out the Makefile's knowledge of the tests,
      and change chkselinuxenv (now renamed "test_sepgsql") into a script that
      verifies the environment is workable and then runs the tests.  It's
      expected that test_sepgsql will only be run manually.
      
      While at it, do some cleanup in the error checking in the script, and
      do some wordsmithing in the documentation.
      cc4ff874
  31. Sep 27, 2011
  32. Sep 23, 2011
  33. Sep 01, 2011
  34. Aug 24, 2011
    • Tom Lane's avatar
      Fix pgxs.mk to always add --dbname=$(CONTRIB_TESTDB) to REGRESS_OPTS. · d1d38860
      Tom Lane authored
      The previous coding resulted in contrib modules unintentionally overriding
      the use of CONTRIB_TESTDB.  There seems no particularly good reason to
      allow that (after all, the makefile can set CONTRIB_TESTDB if that's really
      what it intends).
      
      In passing, document REGRESS_OPTS where the other pgxs.mk options are
      documented.
      
      Back-patch to 9.1 --- in prior versions, there were no cases of contrib
      modules setting REGRESS_OPTS without including the --dbname switch, so
      while the coding was fragile there was no actual bug.
      d1d38860
  35. Aug 19, 2011
    • Robert Haas's avatar
      Clean up 'chkselinuxenv' script. · a4b3feeb
      Robert Haas authored
      Eliminate dependencies on "which", as we don't really need that to be
      installed for proper testing.  Don't number the tests, as that increases
      the footprint of every patch that wants to add or remove tests.  Make
      the test output more informative, so that it's a bit easier to see what
      went right (or wrong).  Spelling and grammar improvements.
      a4b3feeb
    • Robert Haas's avatar
      Fix contrib/sepgsql and contrib/xml2 to always link required libraries. · 10c378f2
      Robert Haas authored
      contrib/xml2 can get by without libxslt; the relevant features just
      won't work.  But if doesn't have libxml2, or if sepgsql doesn't have
      libselinux, the link succeeds but the module then fails to work at load
      time.  To avoid that, link the require libraries unconditionally, so
      that it will be clear at link-time that there is a problem.
      
      Per discussion with Tom Lane and KaiGai Kohei.
      10c378f2
Loading