Skip to content
Snippets Groups Projects
  1. Dec 16, 2015
    • Tom Lane's avatar
      Cope with Readline's failure to track SIGWINCH events outside of input. · bcce4a5e
      Tom Lane authored
      It emerges that libreadline doesn't notice terminal window size change
      events unless they occur while collecting input.  This is easy to stumble
      over if you resize the window while using a pager to look at query output,
      but it can be demonstrated without any pager involvement.  The symptom is
      that queries exceeding one line are misdisplayed during subsequent input
      cycles, because libreadline has the wrong idea of the screen dimensions.
      
      The safest, simplest way to fix this is to call rl_reset_screen_size()
      just before calling readline().  That causes an extra ioctl(TIOCGWINSZ)
      for every command; but since it only happens when reading from a tty, the
      performance impact should be negligible.  A more valid objection is that
      this still leaves a tiny window during entry to readline() wherein delivery
      of SIGWINCH will be missed; but the practical consequences of that are
      probably negligible.  In any case, there doesn't seem to be any good way to
      avoid the race, since readline exposes no functions that seem safe to call
      from a generic signal handler --- rl_reset_screen_size() certainly isn't.
      
      It turns out that we also need an explicit rl_initialize() call, else
      rl_reset_screen_size() dumps core when called before the first readline()
      call.
      
      rl_reset_screen_size() is not present in old versions of libreadline,
      so we need a configure test for that.  (rl_initialize() is present at
      least back to readline 4.0, so we won't bother with a test for it.)
      We would need a configure test anyway since libedit's emulation of
      libreadline doesn't currently include such a function.  Fortunately,
      libedit seems not to have any corresponding bug.
      
      Merlin Moncure, adjusted a bit by me
      bcce4a5e
  2. Oct 05, 2015
  3. Jul 17, 2015
    • Noah Misch's avatar
      AIX: Test the -qlonglong option before use. · 12073b9a
      Noah Misch authored
      xlc provides "long long" unconditionally at C99-compatible language
      levels, and this option provokes a warning.  The warning interferes with
      "configure" tests that fail in response to any warning.  Notably, before
      commit 85a2a890, it interfered with the
      test for -qnoansialias.  Back-patch to 9.0 (all supported versions).
      12073b9a
  4. Jul 05, 2015
    • Tom Lane's avatar
      Make numeric form of PG version number readily available in Makefiles. · 89b8cf47
      Tom Lane authored
      Expose PG_VERSION_NUM (e.g., "90600") as a Make variable; but for
      consistency with the other Make variables holding similar info,
      call the variable just VERSION_NUM not PG_VERSION_NUM.
      
      There was some discussion of making this value available as a pg_config
      value as well.  However, that would entail substantially more work than
      this two-line patch.  Given that there was not exactly universal consensus
      that we need this at all, let's just do a minimal amount of work for now.
      
      Back-patch of commit a5d489cc, so that this
      variable is actually useful for its intended purpose sometime before 2020.
      
      Michael Paquier, reviewed by Pavel Stehule
      89b8cf47
  5. Jun 30, 2015
  6. Jun 09, 2015
  7. Jun 01, 2015
  8. May 18, 2015
  9. Feb 02, 2015
  10. Jan 08, 2015
    • Noah Misch's avatar
      On Darwin, detect and report a multithreaded postmaster. · 5ca4e444
      Noah Misch authored
      Darwin --enable-nls builds use a substitute setlocale() that may start a
      thread.  Buildfarm member orangutan experienced BackendList corruption
      on account of different postmaster threads executing signal handlers
      simultaneously.  Furthermore, a multithreaded postmaster risks undefined
      behavior from sigprocmask() and fork().  Emit LOG messages about the
      problem and its workaround.  Back-patch to 9.0 (all supported versions).
      5ca4e444
  11. Jul 22, 2014
    • Noah Misch's avatar
      Diagnose incompatible OpenLDAP versions during build and test. · cec0c218
      Noah Misch authored
      With OpenLDAP versions 2.4.24 through 2.4.31, inclusive, PostgreSQL
      backends can crash at exit.  Raise a warning during "configure" based on
      the compile-time OpenLDAP version number, and test the crash scenario in
      the dblink test suite.  Back-patch to 9.0 (all supported versions).
      cec0c218
  12. Jul 21, 2014
  13. Jun 14, 2014
    • Noah Misch's avatar
      Add mkdtemp() to libpgport. · a919937f
      Noah Misch authored
      This function is pervasive on free software operating systems; import
      NetBSD's implementation.  Back-patch to 8.4, like the commit that will
      harness it.
      a919937f
  14. Mar 17, 2014
  15. Feb 17, 2014
  16. Dec 02, 2013
  17. Oct 08, 2013
  18. Jul 25, 2013
    • Tom Lane's avatar
      Fix configure probe for sys/ucred.h. · 8714465f
      Tom Lane authored
      The configure script's test for <sys/ucred.h> did not work on OpenBSD,
      because on that platform <sys/param.h> has to be included first.
      As a result, socket peer authentication was disabled on that platform.
      Problem introduced in commit be4585b1.
      
      Andres Freund, slightly simplified by me.
      8714465f
  19. Apr 01, 2013
  20. Feb 04, 2013
  21. Dec 18, 2012
    • Tom Lane's avatar
      Ignore libedit/libreadline while probing for standard functions. · 31e0349a
      Tom Lane authored
      Some versions of libedit expose bogus definitions of setproctitle(),
      optreset, and perhaps other symbols that we don't want configure to pick up
      on.  There was a previous report of similar problems with strlcpy(), which
      we addressed in commit 59cf88da, but the
      problem has evidently grown in scope since then.  In hopes of not having to
      deal with it again in future, rearrange configure's tests for supplied
      functions so that we ignore libedit/libreadline except when probing
      specifically for functions we expect them to provide.
      
      Per report from Christoph Berg, though this is slightly more aggressive
      than his proposed patch.
      31e0349a
  22. Dec 03, 2012
  23. Sep 19, 2012
  24. Sep 06, 2012
  25. Aug 31, 2012
    • Tom Lane's avatar
      Make configure probe for mbstowcs_l as well as wcstombs_l. · e4679442
      Tom Lane authored
      We previously supposed that any given platform would supply both or neither
      of these functions, so that one configure test would be sufficient.  It now
      appears that at least on AIX this is not the case ... which is likely an
      AIX bug, but nonetheless we need to cope with it.  So use separate tests.
      Per bug #6758; thanks to Andrew Hastie for doing the followup testing
      needed to confirm what was happening.
      
      Backpatch to 9.1, where we began using these functions.
      e4679442
  26. Aug 24, 2012
  27. Aug 17, 2012
    • Tom Lane's avatar
      Check LIBXML_VERSION instead of testing in configure script. · 33f40976
      Tom Lane authored
      We had put a test for libxml2's xmlStructuredErrorContext variable in
      configure, but of course that doesn't work on Windows builds.  The next
      best alternative seems to be to test the LIBXML_VERSION symbol provided
      by xmlversion.h.
      
      Per report from Talha Bin Rizwan, though this fixes it in a different way
      than his proposed patch.
      33f40976
  28. Aug 15, 2012
  29. Aug 03, 2012
  30. Jun 01, 2012
  31. May 14, 2012
  32. May 12, 2012
    • Peter Eisentraut's avatar
      Remove unused AC_SUBST variables · 7b85527e
      Peter Eisentraut authored
      These were apparently never used.  The AC_SUBST was probably just
      added in a copy-and-paste manner.  (The shell variables continue to be
      used inside configure.  The change is just that we don't need them
      outside of configure.)
      7b85527e
  33. May 11, 2012
  34. May 07, 2012
  35. May 03, 2012
  36. May 01, 2012
    • Peter Eisentraut's avatar
      Remove dead ports · f2f9439f
      Peter Eisentraut authored
      Remove the following ports:
      
      - dgux
      - nextstep
      - sunos4
      - svr4
      - ultrix4
      - univel
      
      These are obsolete and not worth rescuing.  In most cases, there is
      circumstantial evidence that they wouldn't work anymore anyway.
      f2f9439f
  37. Feb 23, 2012
  38. Feb 07, 2012
    • Robert Haas's avatar
      Support fls(). · 4f658dc8
      Robert Haas authored
      The immediate impetus for this is that Noah Misch's patch to elide
      unnecessary table and index rebuilds when changing typmod for temporal
      types uses it; and this is extracted from that patch, with some
      further commentary by me.  But it seems logically separate from the
      remainder of the patch, so I'm committing it separately; this is not
      the first time someone has wanted fls() in the backend and probably
      won't be the last.
      
      If we end up using this in more performance-critical spots it may be
      worthwhile to add some architecture-specific optimizations to our
      src/port version of fls() - e.g. any x86 platform can implement this
      using the assembly instruction BSRL.  But performance won't matter
      a bit for assessing typmod changes, so I'm not worried about that
      right now.
      4f658dc8
  39. Jan 07, 2012
    • Tom Lane's avatar
      Use __sync_lock_test_and_set() for spinlocks on ARM, if available. · 0a41e865
      Tom Lane authored
      Historically we've used the SWPB instruction for TAS() on ARM, but this
      is deprecated and not available on ARMv6 and later.  Instead, make use
      of a GCC builtin if available.  We'll still fall back to SWPB if not,
      so as not to break existing ports using older GCC versions.
      
      Eventually we might want to try using __sync_lock_test_and_set() on some
      other architectures too, but for now that seems to present only risk and
      not reward.
      
      Back-patch to all supported versions, since people might want to use any
      of them on more recent ARM chips.
      
      Martin Pitt
      0a41e865
Loading