1. 03 Feb, 2016 5 commits
  2. 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
  3. 01 Feb, 2016 6 commits
  4. 31 Jan, 2016 1 commit
  5. 30 Jan, 2016 2 commits
    • Peter Eisentraut's avatar
      Fix whitespace · 9217bf39
      Peter Eisentraut authored
      9217bf39
    • Robert Haas's avatar
      postgres_fdw: More preliminary refactoring for upcoming join pushdown. · cc592c48
      Robert Haas authored
      The code that generates a complete SQL query for a given foreign relation
      was repeated in two places, and they didn't quite agree: the EXPLAIN case
      left out the locking clause.  Centralize the code so we get the same
      behavior everywhere, and adjust calling conventions and which functions
      are static vs. extern accordingly .  Centralize the code so we get the same
      behavior everywhere, and adjust calling conventions and which functions
      are static vs. extern accordingly.
      
      Ashutosh Bapat, reviewed and slightly adjusted by me.
      cc592c48
  6. 29 Jan, 2016 5 commits
    • Robert Haas's avatar
      Migrate replication slot I/O locks into a separate tranche. · 2251179e
      Robert Haas authored
      This is following in a long train of similar changes and for the same
      reasons - see b319356f and
      fe702a7b inter alia.
      
      Author: Amit Kapila
      Reviewed-by: Alexander Korotkov, Robert Haas
      2251179e
    • Robert Haas's avatar
      Migrate PGPROC's backendLock into PGPROC itself, using a new tranche. · b319356f
      Robert Haas authored
      Previously, each PGPROC's backendLock was part of the main tranche,
      and the PGPROC just contained a pointer.  Now, the actual LWLock is
      part of the PGPROC.
      
      As with previous, similar patches, this makes it significantly easier
      to identify these lwlocks in LWLOCK_STATS or Trace_lwlocks output
      and improves modularity.
      
      Author: Ildus Kurbangaliev
      Reviewed-by: Amit Kapila, Robert Haas
      b319356f
    • Alvaro Herrera's avatar
      pgbench: refactor handling of stats tracking · b6037664
      Alvaro Herrera authored
      This doesn't add any functionality but just shuffles things around so
      that it can be reused and improved later.
      
      Author: Fabien Coelho
      Reviewed-by: Michael Paquier, Álvaro Herrera
      b6037664
    • Tom Lane's avatar
      Fix incorrect pattern-match processing in psql's \det command. · 7e224704
      Tom Lane authored
      listForeignTables' invocation of processSQLNamePattern did not match up
      with the other ones that handle potentially-schema-qualified names; it
      failed to make use of pg_table_is_visible() and also passed the name
      arguments in the wrong order.  Bug seems to have been aboriginal in commit
      0d692a0d.  It accidentally sort of worked as long as you didn't
      inquire too closely into the behavior, although the silliness was later
      exposed by inconsistencies in the test queries added by 59efda3e
      (which I probably should have questioned at the time, but didn't).
      
      Per bug #13899 from Reece Hart.  Patch by Reece Hart and Tom Lane.
      Back-patch to all affected branches.
      7e224704
    • Fujii Masao's avatar
      Fix syntax descriptions for replication commands in logicaldecoding.sgml · c35c4ec4
      Fujii Masao authored
      Patch-by: Oleksandr Shulgin
      Reviewed-by: Craig Ringer and Fujii Masao
      Backpatch-through: 9.4 where logical decoding was introduced
      c35c4ec4
  7. 28 Jan, 2016 10 commits
    • Robert Haas's avatar
      postgres_fdw: Refactor deparsing code for locking clauses. · b88ef201
      Robert Haas authored
      The upcoming patch to allow join pushdown in postgres_fdw needs to use
      this code multiple times, which requires moving it to deparse.c.  That
      seems like a good idea anyway, so do that now both on general principle
      and to simplify the future patch.
      
      Inspired by a patch by Shigeru Hanada and Ashutosh Bapat, but I did
      it a little differently than what that patch did.
      b88ef201
    • Robert Haas's avatar
      Only try to push down foreign joins if the user mapping OIDs match. · fbe5a3fb
      Robert Haas authored
      Previously, the foreign join pushdown infrastructure left the question
      of security entirely up to individual FDWs, but it would be easy for
      a foreign data wrapper to inadvertently open up subtle security holes
      that way.  So, make it the core code's job to determine which user
      mapping OID is relevant, and don't attempt join pushdown unless it's
      the same for all relevant relations.
      
      Per a suggestion from Tom Lane.  Shigeru Hanada and Ashutosh Bapat,
      reviewed by Etsuro Fujita and KaiGai Kohei, with some further
      changes by me.
      fbe5a3fb
    • Robert Haas's avatar
      Add missing quotation mark. · 2f6b041f
      Robert Haas authored
      This fix accidentally got left out of the previous commit.
      2f6b041f
    • Robert Haas's avatar
      Avoid multiple foreign server connections when all use same user mapping. · 96198d94
      Robert Haas authored
      Previously, postgres_fdw's connection cache was keyed by user OID and
      server OID, but this can lead to multiple connections when it's not
      really necessary.  In particular, if all relevant users are mapped to
      the public user mapping, then their connection options are certainly
      the same, so one connection can be used for all of them.
      
      While we're cleaning things up here, drop the "server" argument to
      GetConnection(), which isn't really needed.  This saves a few cycles
      because callers no longer have to look this up; the function itself
      does, but only when establishing a new connection, not when reusing
      an existing one.
      
      Ashutosh Bapat, with a few small changes by me.
      96198d94
    • Robert Haas's avatar
      Add [NO]BYPASSRLS options to CREATE USER and ALTER USER docs. · 80db1ca2
      Robert Haas authored
      Patch-by: Filip Rembiałkowski
      Reviewed-by: Robert Haas
      Backpatch-through: 9.5
      80db1ca2
    • Alvaro Herrera's avatar
      Fix spi_worker mention in bgworker documentation · e3748385
      Alvaro Herrera authored
      The documentation mentioned contrib/ but the module was moved to
      src/test/modules/ by commit 22dfd116 of 9.5 era.
      
      Problem pointed out by Dickson Guedes in bug #13896
      Backpatch-to: 9.5.
      e3748385
    • Fujii Masao's avatar
      Fix typos in comments and doc · 62e2ddd4
      Fujii Masao authored
      overriden -> overridden
      
      The misspelling in create_extension.sgml was introduced in b67aaf21,
      so no need to backpatch.
      62e2ddd4
    • Fujii Masao's avatar
      Add gin_clean_pending_list function to clean up GIN pending list · 7f46eaf0
      Fujii Masao authored
      This function cleans up the pending list of the GIN index by
      moving entries in it to the main GIN data structure in bulk.
      It returns the number of pages cleaned up from the pending list.
      
      This function is useful, for example, when the pending list
      needs to be cleaned up *quickly* to improve the performance of
      the search using GIN index. VACUUM can do the same thing, too,
      but it may take days to run on a large table.
      
      Jeff Janes,
      reviewed by Julien Rouhaud, Jaime Casanova, Alvaro Herrera and me.
      
      Discussion: CAMkU=1x8zFkpfnozXyt40zmR3Ub_kHu58LtRmwHUKRgQss7=iQ@mail.gmail.com
      7f46eaf0
    • Robert Haas's avatar
      Assert that create_unique_path returns non-NULL. · eaf7b1f6
      Robert Haas authored
      Per off-list discussion with Tom Lane and Michael Paquier, Coverity
      gets unhappy if this is not done.
      eaf7b1f6
    • Robert Haas's avatar
      Fix cross-version pg_dump for aggregate combine functions. · 025b2f33
      Robert Haas authored
      Fixes a defect in commit a7de3dc5.
      
      David Rowley, per report from Jeff Janes, who also checked that the
      fix works.
      025b2f33
  8. 27 Jan, 2016 3 commits
    • Fujii Masao's avatar
      Fix volatility marking of pg_size_pretty function · e09507a2
      Fujii Masao authored
      pg_size_pretty function should be marked immutable rather than volatile
      because it always returns the same result given the same argument.
      
      Pavel Stehule
      e09507a2
    • Alvaro Herrera's avatar
      pgbench: improve multi-script support · 8bea3d22
      Alvaro Herrera authored
      Previously, it was possible to specify one or several custom scripts to
      run, or only one of the builtin scripts.  With this patch it is also
      possible to specify to run the builtin scripts multiple times, using the
      new -b option.  Also, unify the code for both cases; this eases future
      pgbench improvements.
      
      Author: Fabien Coelho
      Review: Michaël Paquier, Álvaro Herrera
      8bea3d22
    • Alvaro Herrera's avatar
      Mostly mechanical cleanup of pgbench · 5b3cc1af
      Alvaro Herrera authored
      pgindent for recent commits; also change some variables from int to
      boolean, which is how they are really used.
      
      Mostly submitted by Fabien Coelho; this is in preparation to commit
      further patches to the file.
      5b3cc1af
  9. 26 Jan, 2016 1 commit