1. 06 Feb, 2016 3 commits
  2. 05 Feb, 2016 11 commits
  3. 04 Feb, 2016 4 commits
    • Robert Haas's avatar
      Add some additional core functions to support join pushdown for FDWs. · a104a017
      Robert Haas authored
      GetExistingLocalJoinPath() is useful for handling EvalPlanQual rechecks
      properly, and GetUserMappingById() is needed to make sure you're using
      the right credentials.
      
      Shigeru Hanada, Etsuro Fujita, Ashutosh Bapat, Robert Haas
      a104a017
    • Robert Haas's avatar
      Change the way that LWLocks for extensions are allocated. · c1772ad9
      Robert Haas authored
      The previous RequestAddinLWLocks() method had several disadvantages.
      First, the locks would be in the main tranche; we've recently decided
      that it's useful for LWLocks used for separate purposes to have
      separate tranche IDs.  Second, there wasn't any correlation between
      what code called RequestAddinLWLocks() and what code called
      LWLockAssign(); when multiple modules are in use, it could become
      quite difficult to troubleshoot problems where LWLockAssign() ran out
      of locks.  To fix, create a concept of named LWLock tranches which
      can be used either by extension or by core code.
      
      Amit Kapila and Robert Haas
      c1772ad9
    • Tom Lane's avatar
      Simplify syntax diagram for REINDEX. · 5ef244a2
      Tom Lane authored
      Since there currently is only one possible parenthesized option, namely
      VERBOSE, it's a bit pointless to show it with "{ } [, ... ]".  The curly
      braces are useless and therefore confusing, as seen in a recent question
      from Karsten Hilbert.  Remove the extra decoration for the time being;
      we can put it back when and if REINDEX grows some more options.
      5ef244a2
    • Tom Lane's avatar
      In pg_dump, ensure that view triggers are processed after view rules. · 0ed707e9
      Tom Lane authored
      If a view is split into CREATE TABLE + CREATE RULE to break a circular
      dependency, then any triggers on the view must be dumped/reloaded after
      the CREATE RULE; else the backend may reject the CREATE TRIGGER because
      it's the wrong type of trigger for a plain table.  This works all right
      in plain dump/restore because of pg_dump's sorting heuristic that places
      triggers after rules.  However, when using parallel restore, the ordering
      must be enforced by a dependency --- and we didn't have one.
      
      Fixing this is a mere matter of adding an addObjectDependency() call,
      except that we need to be able to find all the triggers belonging to the
      view relation, and there was no easy way to do that.  Add fields to
      pg_dump's TableInfo struct to remember where the associated TriggerInfo
      struct(s) are.
      
      Per bug report from Dennis Kögel.  The failure can be exhibited at least
      as far back as 9.1, so back-patch to all supported branches.
      0ed707e9
  4. 03 Feb, 2016 11 commits
    • Robert Haas's avatar
      Extend sortsupport for text to more opclasses. · b47b4dbf
      Robert Haas authored
      Have varlena.c expose an interface that allows the char(n), bytea, and
      bpchar types to piggyback on a now-generalized SortSupport for text.
      This pushes a little more knowledge of the bpchar/char(n) type into
      varlena.c than might be preferred, but that seems like the approach
      that creates least friction.  Also speed things up for index builds
      that use text_pattern_ops or varchar_pattern_ops.
      
      This patch does quite a bit of renaming, but it seems likely to be
      worth it, so as to avoid future confusion about the fact that this code
      is now more generally used than the old names might have suggested.
      
      Peter Geoghegan, reviewed by Álvaro Herrera and Andreas Karlsson,
      with small tweaks by me.
      b47b4dbf
    • Tom Lane's avatar
      Add hstore_to_jsonb() and hstore_to_jsonb_loose() to hstore documentation. · 24a26c9f
      Tom Lane authored
      These were never documented anywhere user-visible.  Tut tut.
      24a26c9f
    • Robert Haas's avatar
      Allow parallel custom and foreign scans. · 69d34408
      Robert Haas authored
      This patch doesn't put the new infrastructure to use anywhere, and
      indeed it's not clear how it could ever be used for something like
      postgres_fdw which has to send an SQL query and wait for a reply,
      but there might be FDWs or custom scan providers that are CPU-bound,
      so let's give them a way to join club parallel.
      
      KaiGai Kohei, reviewed by me.
      69d34408
    • Peter Eisentraut's avatar
      doc: Fix stand-alone INSTALL file build · 25e44518
      Peter Eisentraut authored
      Commit 7d17e683 introduced an external
      link.
      25e44518
    • Tom Lane's avatar
      Make hstore_to_jsonb_loose match hstore_to_json_loose on what's a number. · 41d2c081
      Tom Lane authored
      Commit e09996ff removed some ad-hoc code in hstore_to_json_loose
      that determined whether an hstore value string looked like a number,
      in favor of calling the JSON parser's is-it-a-number code.  However,
      it neglected the fact that the exact same code appeared in
      hstore_to_jsonb_loose.
      
      This is not a bug, exactly, because the requirements on the two functions
      are not the same: hstore_to_json_loose must accept only syntactically legal
      JSON numbers as numbers, or it will produce invalid JSON output, as per bug
      #12070 which spawned the prior commit.  But hstore_to_jsonb_loose could
      accept anything that numeric_in will eat, other than Inf and NaN.
      
      Nonetheless it seems surprising and arbitrary that the two functions don't
      use the same rules for what is a number versus what is a string; especially
      since they did use the same rules before the aforesaid commit.  For one
      thing, that means that doing hstore_to_json_loose and then casting to jsonb
      can produce results different from doing just hstore_to_jsonb_loose.
      
      Hence, change hstore_to_jsonb_loose's logic to match hstore_to_json_loose,
      ie, hstore values are treated as numbers when they match the JSON syntax
      for numbers.
      
      No back-patch, since this is more in the nature of a definitional change
      than a bug fix.
      41d2c081
    • Robert Haas's avatar
      Code review for commit dc203dc3. · 52b63649
      Robert Haas authored
      Remove duplicate assignment.  This part by Ashutosh Bapat.
      
      Remove now-obsolete comment.  This part by me, although the pending
      join pushdown patch does something similar, and for the same reason:
      there's no reason to keep two lists of the things in the fdw_private
      structure that have to be kept in sync with each other.
      52b63649
    • Robert Haas's avatar
      Remove CustomPath's TextOutCustomPath method. · f2305d40
      Robert Haas authored
      You can't really do anything useful with this in the form it currently
      exists; among other problems, there's no way to reread whatever
      information might be produced when the path is output.  Work is
      underway to replace this with a more useful and more general system of
      extensible nodes, but let's start by getting rid of this bit.
      
      Extracted from a larger patch by KaiGai Kohei.
      f2305d40
    • Robert Haas's avatar
      postgres_fdw: Allow fetch_size to be set per-table or per-server. · dc203dc3
      Robert Haas authored
      The default fetch size of 100 rows might not be right in every
      environment, so allow users to configure it.
      
      Corey Huinker, reviewed by Kyotaro Horiguchi, Andres Freund, and me.
      dc203dc3
    • Tom Lane's avatar
      Fix IsValidJsonNumber() to notice trailing non-alphanumeric garbage. · e6ecc93a
      Tom Lane authored
      Commit e09996ff was one brick shy of a load: it didn't insist
      that the detected JSON number be the whole of the supplied string.
      This allowed inputs such as "2016-01-01" to be misdetected as valid JSON
      numbers.  Per bug #13906 from Dmitry Ryabov.
      
      In passing, be more wary of zero-length input (I'm not sure this can
      happen given current callers, but better safe than sorry), and do some
      minor cosmetic cleanup.
      e6ecc93a
    • Peter Eisentraut's avatar
      Add support for systemd service notifications · 7d17e683
      Peter Eisentraut authored
      Insert sd_notify() calls at server start and stop for integration with
      systemd.  This allows the use of systemd service units of type "notify",
      which greatly simplifies the systemd configuration.
      Reviewed-by: default avatarPavel Stěhule <pavel.stehule@gmail.com>
      7d17e683
    • Peter Eisentraut's avatar
      Improve error reporting when location specified by postgres -D does not exist · ac7238dc
      Peter Eisentraut authored
      Previously, the first error seen would be that postgresql.conf does not
      exist.  But for the case where the whole directory does not exist, give
      an error message about that, together with a hint for how to create one.
      ac7238dc
  5. 02 Feb, 2016 7 commits
    • Tom Lane's avatar
      Remove printQueryOpt.quote field. · 2808a2e0
      Tom Lane authored
      This field was included in the original definition of the printQueryOpt
      struct in commit a45195a1, but it was not used anywhere in that
      commit, nor since then.  Spotted by Dickson S. Guedes.
      2808a2e0
    • Alvaro Herrera's avatar
      Don't test for system columns on join relations · 3cb5867b
      Alvaro Herrera authored
      create_foreignscan_plan needs to know whether any system columns are
      requested from a relation (this flag is needed by ForeignNext during
      execution).  However, for join relations this is a pointless test,
      because it's not possible to request system columns from them, so
      remove the check.
      
      Author: Etsuro Fujita
      Discussion: http://www.postgresql.org/message-id/56AA0FC5.9000207@lab.ntt.co.jp
      Reviewed-by: David Rowley, Robert Haas
      3cb5867b
    • Tom Lane's avatar
      Remove unnecessary "implementation of FOO operator" DESCR() entries. · 2ad83fff
      Tom Lane authored
      Apparently at least one committer hasn't gotten the word that these do not
      need to be maintained by hand, since initdb will create them automatically.
      Noted while fixing bug #13905.
      
      No catversion bump since the post-initdb state is exactly the same either
      way.  I don't see a need for back-patch, either.
      2ad83fff
    • Tom Lane's avatar
      Fix pg_description entries for jsonb_to_record() and jsonb_to_recordset(). · a4627e8f
      Tom Lane authored
      All the other jsonb function descriptions refer to the arguments as being
      "jsonb", but these two said "json".  Make it consistent.  Per bug #13905
      from Petru Florin Mihancea.
      
      No catversion bump --- we can't force one in the back branches, and this
      isn't very critical anyway.
      a4627e8f
    • Magnus Hagander's avatar
      Fix typo in comment · 23f3cc36
      Magnus Hagander authored
      23f3cc36
    • Teodor Sigaev's avatar
      Fix lossy KNN GiST when ordering operator returns non-float8 value. · f25d07d9
      Teodor Sigaev authored
      KNN GiST with recheck flag should return to executor the same type as ordering
      operator, GiST detects this type by looking to return type of function which
      implements ordering operator. But occasionally detecting code works after
      replacing ordering operator function to distance support function.
      Distance support function always returns float8, so, detecting code get float8
      instead of actual return type of ordering operator.
      
      Built-in opclasses don't have ordering operator which doesn't return
      non-float8 value, so, tests are impossible here, at least now.
      
      Backpatch to 9.5 where lozzy KNN was introduced.
      
      Author: Alexander Korotkov
      Report by: Artur Zakirov
      f25d07d9
    • Robert Haas's avatar
      Make all built-in lwlock tranche IDs fixed. · 7191ce8b
      Robert Haas authored
      This makes the values more stable, which seems like a good thing for
      anybody who needs to look at at them.
      
      Alexander Korotkov and Amit Kapila
      7191ce8b
  6. 01 Feb, 2016 4 commits