Skip to content
Snippets Groups Projects
  1. Apr 20, 2017
  2. Apr 18, 2017
  3. Apr 17, 2017
  4. Apr 16, 2017
  5. Apr 15, 2017
    • Tom Lane's avatar
      Provide a way to control SysV shmem attach address in EXEC_BACKEND builds. · a74740fb
      Tom Lane authored
      In standard non-Windows builds, there's no particular reason to care what
      address the kernel chooses to map the shared memory segment at.  However,
      when building with EXEC_BACKEND, there's a risk that the chosen address
      won't be available in all child processes.  Linux with ASLR enabled (which
      it is by default) seems particularly at risk because it puts shmem segments
      into the same area where it maps shared libraries.  We can work around
      that by specifying a mapping address that's outside the range where
      shared libraries could get mapped.  On x86_64 Linux, 0x7e0000000000
      seems to work well.
      
      This is only meant for testing/debugging purposes, so it doesn't seem
      necessary to go as far as providing a GUC (or any user-visible
      documentation, though we might change that later).  Instead, it's just
      controlled by setting an environment variable PG_SHMEM_ADDR to the
      desired attach address.
      
      Back-patch to all supported branches, since the point here is to
      remove intermittent buildfarm failures on EXEC_BACKEND animals.
      Owners of affected animals will need to add a suitable setting of
      PG_SHMEM_ADDR to their build_env configuration.
      
      Discussion: https://postgr.es/m/7036.1492231361@sss.pgh.pa.us
      a74740fb
    • Tom Lane's avatar
      Fix erroneous cross-reference in comment. · bfba563b
      Tom Lane authored
      Seems to have been introduced in commit c219d9b0.  I think there indeed
      was a "tupbasics.h" in some early drafts of that refactoring, but it
      didn't survive into the committed version.
      
      Amit Kapila
      bfba563b
    • Tom Lane's avatar
      More cleanup of manipulations of hash indexes' hasho_flag field. · 083dc95a
      Tom Lane authored
      Not much point in defining test macros for the flag bits if we
      don't use 'em.
      
      Amit Kapila
      083dc95a
    • Andrew Dunstan's avatar
      Downcase "Wincrypt.h" · 0eba6be1
      Andrew Dunstan authored
      This is consistent with how we refer to other Windows include files, and
      prevents a failure when cross-compiling on a system with case sensitive
      file names.
      0eba6be1
    • Tom Lane's avatar
      Avoid passing function pointers across process boundaries. · 32470825
      Tom Lane authored
      We'd already recognized that we can't pass function pointers across process
      boundaries for functions in loadable modules, since a shared library could
      get loaded at different addresses in different processes.  But actually the
      practice doesn't work for functions in the core backend either, if we're
      using EXEC_BACKEND.  This is the cause of recent failures on buildfarm
      member culicidae.  Switch to passing a string function name in all cases.
      
      Something like this needs to be back-patched into 9.6, but let's see
      if the buildfarm likes it first.
      
      Petr Jelinek, with a bunch of basically-cosmetic adjustments by me
      
      Discussion: https://postgr.es/m/548f9c1d-eafa-e3fa-9da8-f0cc2f654e60@2ndquadrant.com
      32470825
  6. Apr 14, 2017
    • Tom Lane's avatar
      Use one transaction while reading postgres.bki, not one per line. · 85a07813
      Tom Lane authored
      AFAICT, the only actual benefit of closing a bootstrap transaction
      is to reclaim transient memory.  We can do that a lot more cheaply
      by just doing a MemoryContextReset on a suitable context.  This
      gets the runtime of the "bootstrap" phase of initdb down to the
      point where, at least by eyeball, it's quite negligible compared
      to the rest of the phases.  Per discussion with Andres Freund.
      
      Discussion: https://postgr.es/m/9244.1492106743@sss.pgh.pa.us
      85a07813
    • Tom Lane's avatar
      Clean up manipulations of hash indexes' hasho_flag field. · 2040bb4a
      Tom Lane authored
      Standardize on testing a hash index page's type by doing
      	(opaque->hasho_flag & LH_PAGE_TYPE) == LH_xxx_PAGE
      Various places were taking shortcuts like
      	opaque->hasho_flag & LH_BUCKET_PAGE
      which while not actually wrong, is still bad practice because
      it encourages use of
      	opaque->hasho_flag & LH_UNUSED_PAGE
      which *is* wrong (LH_UNUSED_PAGE == 0, so the above is constant false).
      hash_xlog.c's hash_mask() contained such an incorrect test.
      
      This also ensures that we mask out the additional flag bits that
      hasho_flag has accreted since 9.6.  pgstattuple's pgstat_hash_page(),
      for one, was failing to do that and was thus actively broken.
      
      Also fix assorted comments that hadn't been updated to reflect the
      extended usage of hasho_flag, and fix some macros that were testing
      just "(hasho_flag & bit)" to use the less dangerous, project-approved
      form "((hasho_flag & bit) != 0)".
      
      Coverity found the bug in hash_mask(); I noted the one in
      pgstat_hash_page() through code reading.
      2040bb4a
    • Peter Eisentraut's avatar
      Report statistics in logical replication workers · 139eb967
      Peter Eisentraut authored
      
      Author: Stas Kelvich <s.kelvich@postgrespro.ru>
      Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
      Reported-by: default avatarFujii Masao <masao.fujii@gmail.com>
      139eb967
    • Peter Eisentraut's avatar
      Catversion bump · 67c2def1
      Peter Eisentraut authored
      for commit 887227a1
      67c2def1
    • Peter Eisentraut's avatar
      Add option to modify sync commit per subscription · 887227a1
      Peter Eisentraut authored
      This also changes default behaviour of subscription workers to
      synchronous_commit = off.
      
      Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
      887227a1
Loading