1. 29 Jan, 2014 12 commits
    • Andrew Dunstan's avatar
      Add json_array_elements_text function. · 5264d915
      Andrew Dunstan authored
      This was a notable omission from the json functions added in 9.3 and
      there have been numerous complaints about its absence.
      
      Laurence Rowe.
      5264d915
    • Heikki Linnakangas's avatar
      Fix thinko in huge_tlb_pages patch. · 699b1f40
      Heikki Linnakangas authored
      We calculated the rounded-up size for the allocation, but then failed to
      use the rounded-up value in the mmap() call. Oops.
      
      Also, initialize allocsize, to silence warnings seen with some compilers,
      as pointed out by Jeff Janes.
      699b1f40
    • Heikki Linnakangas's avatar
      Further optimize GIN multi-key searches. · 626a1206
      Heikki Linnakangas authored
      When skipping over some items in a posting tree, re-find the new location
      by descending the tree from root, rather than walking the right links.
      This can save a lot of I/O.
      
      Heavily modified from Alexander Korotkov's fast scan patch.
      626a1206
    • Bruce Momjian's avatar
      8440897b
    • Bruce Momjian's avatar
      e93f7253
    • Bruce Momjian's avatar
      Add more C comments to entab.c. · db90bcf8
      Bruce Momjian authored
      db90bcf8
    • Heikki Linnakangas's avatar
      Further optimize multi-key GIN searches. · 25b1dafa
      Heikki Linnakangas authored
      If we're skipping past a certain TID, avoid decoding posting list segments
      that only contain smaller TIDs.
      
      Extracted from Alexander Korotkov's fast scan patch, heavily modified.
      25b1dafa
    • Heikki Linnakangas's avatar
      Allow skipping some items in a multi-key GIN search. · e20c70cb
      Heikki Linnakangas authored
      In a multi-key search, ie. something like "col @> 'foo' AND col @> 'bar'",
      as soon as we find the next item that matches the first criteria, we don't
      need to check the second criteria for TIDs smaller the first match. That
      saves a lot of effort, especially if one of the terms is rare, while the
      second occurs very frequently.
      
      Based on ideas from Alexander Korotkov's fast scan patch.
      e20c70cb
    • Andrew Dunstan's avatar
    • Heikki Linnakangas's avatar
      Fix docs build. · 991659dc
      Heikki Linnakangas authored
      Broken by the huge_tlb_pages patch.
      
      Vik Fearing.
      991659dc
    • Heikki Linnakangas's avatar
      Allow using huge TLB pages on Linux (MAP_HUGETLB) · 1a3458b6
      Heikki Linnakangas authored
      This patch adds an option, huge_tlb_pages, which allows requesting the
      shared memory segment to be allocated using huge pages, by using the
      MAP_HUGETLB flag in mmap(). This can improve performance.
      
      The default is 'try', which means that we will attempt using huge pages,
      and fall back to non-huge pages if it doesn't work. Currently, only Linux
      has MAP_HUGETLB. On other platforms, the default 'try' behaves the same as
      'off'.
      
      In the passing, don't try to round the mmap() size to a multiple of
      pagesize. mmap() doesn't require that, and there's no particular reason for
      PostgreSQL to do that either. When using MAP_HUGETLB, however, round the
      request size up to nearest 2MB boundary. This is to work around a bug in
      some Linux kernel versions, but also to avoid wasting memory, because the
      kernel will round the size up anyway.
      
      Many people were involved in writing this patch, including Christian Kruse,
      Richard Poole, Abhijit Menon-Sen, reviewed by Peter Geoghegan, Andres Freund
      and me.
      1a3458b6
    • Robert Haas's avatar
      Fix compiler warning in EXEC_BACKEND builds. · b7643b19
      Robert Haas authored
      Per a report by Rajeev Rastogi.
      b7643b19
  2. 28 Jan, 2014 9 commits
    • Andrew Dunstan's avatar
      Minor docs fixes for new json functions. · c2099751
      Andrew Dunstan authored
      Thom Brown.
      c2099751
    • Andrew Dunstan's avatar
      Add new make targets check-tests and installcheck-tests. · 7043ac71
      Andrew Dunstan authored
      These do not run any specific schedule of tests, but only those
      specified as part of the invocation, e.g.:
      
          make check-tests TESTS="json jsonb"
      7043ac71
    • Andrew Dunstan's avatar
      New json functions. · 10563990
      Andrew Dunstan authored
      json_build_array() and json_build_object allow for the construction of
      arbitrarily complex json trees. json_object() turns a one or two
      dimensional array, or two separate arrays, into a json_object of
      name/value pairs, similarly to the hstore() function.
      json_object_agg() aggregates its two arguments into a single json object
      as name value pairs.
      
      Catalog version bumped.
      
      Andrew Dunstan, reviewed by Marko Tiikkaja.
      10563990
    • Fujii Masao's avatar
      Add pg_stat_archiver statistics view. · 9132b189
      Fujii Masao authored
      This view shows the statistics about the WAL archiver process's activity.
      
      Gabriele Bartolini, reviewed by Michael Paquier, refactored a bit by me.
      9132b189
    • Tom Lane's avatar
      Update comment. · 98d62c28
      Tom Lane authored
      generate_normalized_query() no longer needs to truncate text, but this
      one comment didn't get the memo.  Per Peter Geoghegan.
      98d62c28
    • Bruce Momjian's avatar
      Revert C comment change in slot_attisnull() · c871e8f5
      Bruce Momjian authored
      Revert 89774b58
      c871e8f5
    • Bruce Momjian's avatar
      Remove orphaned prototype · 051b3341
      Bruce Momjian authored
      Rajeev rastogi
      051b3341
    • Stephen Frost's avatar
      Revert dup2() checking in syslogger.c · aef61bf4
      Stephen Frost authored
      Per the expanded comment-
      
      As we're just trying to reset these to go to DEVNULL, there's not
      much point in checking for failure from the close/dup2 calls here,
      if they fail then presumably the file descriptors are closed and
      any writes will go into the bitbucket anyway.
      
      Pointed out by Tom.
      aef61bf4
    • Tom Lane's avatar
      Log a detail message for auth failures due to missing or expired password. · 64e43c59
      Tom Lane authored
      It's worth distinguishing these cases from run-of-the-mill wrong-password
      problems, since users have been known to waste lots of time pursuing the
      wrong theory about what's failing.  Now, our longstanding policy about how
      to report authentication failures is that we don't really want to tell the
      *client* such things, since that might be giving information to a bad guy.
      But there's nothing wrong with reporting the details to the postmaster log,
      and indeed the comments in this area of the code contemplate that
      interesting details should be so reported.  We just weren't handling these
      particular interesting cases usefully.
      
      To fix, add infrastructure allowing subroutines of ClientAuthentication()
      to return a string to be added to the errdetail_log field of the main
      authentication-failed error report.  We might later want to use this to
      report other subcases of authentication failure the same way, but for the
      moment I just dealt with password cases.
      
      Per discussion of a patch from Josh Drake, though this is not what
      he proposed.
      64e43c59
  3. 27 Jan, 2014 6 commits
    • Tom Lane's avatar
      Keep pg_stat_statements' query texts in a file, not in shared memory. · f0d6f202
      Tom Lane authored
      This change allows us to eliminate the previous limit on stored query
      length, and it makes the shared-memory hash table very much smaller,
      allowing more statements to be tracked.  (The default value of
      pg_stat_statements.max is therefore increased from 1000 to 5000.)
      In typical scenarios, the hash table can be large enough to hold all the
      statements commonly issued by an application, so that there is little
      "churn" in the set of tracked statements, and thus little need to do I/O
      to the file.
      
      To further reduce the need for I/O to the query-texts file, add a way
      to retrieve all the columns of the pg_stat_statements view except for
      the query text column.  This is probably not of much interest for human
      use but it could be exploited by programs, which will prefer using the
      queryid anyway.
      
      Ordinarily, we'd need to bump the extension version number for the latter
      change.  But since we already advanced pg_stat_statements' version number
      from 1.1 to 1.2 in the 9.4 development cycle, it seems all right to just
      redefine what 1.2 means.
      
      Peter Geoghegan, reviewed by Pavel Stehule
      f0d6f202
    • Robert Haas's avatar
      Relax the requirement that all lwlocks be stored in a single array. · ea9df812
      Robert Haas authored
      This makes it possible to store lwlocks as part of some other data
      structure in the main shared memory segment, or in a dynamic shared
      memory segment.  There is still a main LWLock array and this patch does
      not move anything out of it, but it provides necessary infrastructure
      for doing that in the future.
      
      This change is likely to increase the size of LWLockPadded on some
      platforms, especially 32-bit platforms where it was previously only
      16 bytes.
      
      Patch by me.  Review by Andres Freund and KaiGai Kohei.
      ea9df812
    • Heikki Linnakangas's avatar
      Fix typo in README · f62eba20
      Heikki Linnakangas authored
      Amit Langote
      f62eba20
    • Tom Lane's avatar
      Code review for auto-tuned effective_cache_size. · 28508969
      Tom Lane authored
      Fix integer overflow issue noted by Magnus Hagander, as well as a bunch
      of other infelicities in commit ee1e5662
      and its unreasonably large number of followups.
      28508969
    • Fujii Masao's avatar
      Change the suffix of auto conf temporary file from "temp" to "tmp". · dd515d40
      Fujii Masao authored
      Michael Paquier
      dd515d40
    • Fujii Masao's avatar
      Fix typos in comments for ALTER SYSTEM. · 7c619be6
      Fujii Masao authored
      Michael Paquier
      7c619be6
  4. 26 Jan, 2014 7 commits
  5. 25 Jan, 2014 6 commits