1. 28 Mar, 2018 8 commits
  2. 27 Mar, 2018 7 commits
    • Tom Lane's avatar
      Update pgindent's typedefs blacklist, and make it easier to adjust. · ef1978d6
      Tom Lane authored
      It seems that all buildfarm members are now using the <stdbool.h> code
      path, so that none of them report "bool" as a typedef.  We still need it
      to be treated that way, so adjust pgindent to force that whether or not
      it's in the given list.
      
      Also, the recent introduction of LLVM infrastructure has caused the
      appearance of some typedef names that we definitely *don't* want
      treated as typedefs, such as "string" and "abs".  Extend the existing
      blacklist to include these.  (Additions based on comparing v10's
      typedefs list to what the buildfarm is currently emitting.)
      
      Rearrange the code so that the lists of whitelisted/blacklisted
      names are a bit easier to find and modify.
      
      Andrew Dunstan and Tom Lane
      
      Discussion: https://postgr.es/m/28690.1521912334@sss.pgh.pa.us
      ef1978d6
    • Tom Lane's avatar
      Allow memory contexts to have both fixed and variable ident strings. · 442accc3
      Tom Lane authored
      Originally, we treated memory context names as potentially variable in
      all cases, and therefore always copied them into the context header.
      Commit 9fa6f00b rethought this a little bit and invented a distinction
      between fixed and variable names, skipping the copy step for the former.
      But we can make things both simpler and more useful by instead allowing
      there to be two parts to a context's identification, a fixed "name" and
      an optional, variable "ident".  The name supplied in the context create
      call is now required to be a compile-time-constant string in all cases,
      as it is never copied but just pointed to.  The "ident" string, if
      wanted, is supplied later.  This is needed because typically we want
      the ident to be stored inside the context so that it's cleaned up
      automatically on context deletion; that means it has to be copied into
      the context before we can set the pointer.
      
      The cost of this approach is basically just an additional pointer field
      in struct MemoryContextData, which isn't much overhead, and is bought
      back entirely in the AllocSet case by not needing a headerSize field
      anymore, since we no longer have to cope with variable header length.
      In addition, we can simplify the internal interfaces for memory context
      creation still further, saving a few cycles there.  And it's no longer
      true that a custom identifier disqualifies a context from participating
      in aset.c's freelist scheme, so possibly there's some win on that end.
      
      All the places that were using non-compile-time-constant context names
      are adjusted to put the variable info into the "ident" instead.  This
      allows more effective identification of those contexts in many cases;
      for example, subsidary contexts of relcache entries are now identified
      by both type (e.g. "index info") and relname, where before you got only
      one or the other.  Contexts associated with PL function cache entries
      are now identified more fully and uniformly, too.
      
      I also arranged for plancache contexts to use the query source string
      as their identifier.  This is basically free for CachedPlanSources, as
      they contained a copy of that string already.  We pay an extra pstrdup
      to do it for CachedPlans.  That could perhaps be avoided, but it would
      make things more fragile (since the CachedPlanSource is sometimes
      destroyed first).  I suspect future improvements in error reporting will
      require CachedPlans to have a copy of that string anyway, so it's not
      clear that it's worth moving mountains to avoid it now.
      
      This also changes the APIs for context statistics routines so that the
      context-specific routines no longer assume that output goes straight
      to stderr, nor do they know all details of the output format.  This
      is useful immediately to reduce code duplication, and it also allows
      for external code to do something with stats output that's different
      from printing to stderr.
      
      The reason for pushing this now rather than waiting for v12 is that
      it rethinks some of the API changes made by commit 9fa6f00b.  Seems
      better for extension authors to endure just one round of API changes
      not two.
      
      Discussion: https://postgr.es/m/CAB=Je-FdtmFZ9y9REHD7VsSrnCkiBhsA4mdsLKSPauwXtQBeNA@mail.gmail.com
      442accc3
    • Simon Riggs's avatar
      Allow HOT updates for some expression indexes · c203d6cf
      Simon Riggs authored
      If the value of an index expression is unchanged after UPDATE,
      allow HOT updates where previously we disallowed them, giving
      a significant performance boost in those cases.
      
      Particularly useful for indexes such as JSON->>field where the
      JSON value changes but the indexed value does not.
      
      Submitted as "surjective indexes" patch, now enabled by use
      of new "recheck_on_update" parameter.
      
      Author: Konstantin Knizhnik
      Reviewer: Simon Riggs, with much wordsmithing and some cleanup
      c203d6cf
    • Peter Eisentraut's avatar
      libpq: PQhost to return active connected host or hostaddr · 1944cdc9
      Peter Eisentraut authored
      Previously, PQhost didn't return the connected host details when the
      connection type was CHT_HOST_ADDRESS (i.e., via hostaddr).  Instead, it
      returned the complete host connection parameter (which could contain
      multiple hosts) or the default host details, which was confusing and
      arguably incorrect.
      
      Change this to return the actually connected host or hostaddr
      irrespective of the connection type.  When hostaddr but no host was
      specified, hostaddr is now returned.  Never return the original host
      connection parameter, and document that PQhost cannot be relied on
      before the connection is established.
      
      PQport is similarly changed to always return the active connection port
      and never the original connection parameter.
      
      Author: Hari Babu <kommi.haribabu@gmail.com>
      Reviewed-by: default avatarMichael Paquier <michael@paquier.xyz>
      Reviewed-by: default avatarKyotaro HORIGUCHI <horiguchi.kyotaro@lab.ntt.co.jp>
      Reviewed-by: default avatarDavid G. Johnston <david.g.johnston@gmail.com>
      1944cdc9
    • Teodor Sigaev's avatar
      Fix count of skipped test of basebackup on Windows · 44bd9584
      Teodor Sigaev authored
      Commit 920a5e50 add tests which should be
      skipped on Windows boxes, but patch doesn't contain right count of them.
      
      David Steel
      44bd9584
    • Teodor Sigaev's avatar
      Skip temp tables from basebackup. · 920a5e50
      Teodor Sigaev authored
      Do not store temp tables in basebackup, they will not be visible anyway, so,
      there are not reasons to store them.
      
      Author: David Steel
      Reviewed by: me
      Discussion: https://www.postgresql.org/message-id/flat/5ea4d26a-a453-c1b7-eff9-5a3ef8f8aceb@pgmasters.net
      920a5e50
    • Teodor Sigaev's avatar
      Add predicate locking for GiST · 3ad55863
      Teodor Sigaev authored
      Add page-level predicate locking, due to gist's code organization, patch seems
      close to trivial: add check before page changing, add predicate lock before page
      scanning.  Although choosing right place to check is not simple: it should not
      be called during index build, it should support insertion of new downlink and so
      on.
      
      Author: Shubham Barai with editorization by me and Alexander Korotkov
      Reviewed by: Alexander Korotkov, Andrey Borodin, me
      Discussion: https://www.postgresql.org/message-id/flat/CALxAEPtdcANpw5ePU3LvnTP8HCENFw6wygupQAyNBgD-sG3h0g@mail.gmail.com
      3ad55863
  3. 26 Mar, 2018 12 commits
  4. 25 Mar, 2018 11 commits
  5. 24 Mar, 2018 2 commits