Skip to content
Snippets Groups Projects
  1. Jun 01, 2012
  2. May 15, 2012
    • Tom Lane's avatar
      Put back AC_REQUIRE([AC_STRUCT_TM]). · f667747b
      Tom Lane authored
      The BSD-ish members of the buildfarm all seem to think removing this
      was a bad idea.  It looks to me like it resulted in omitting the system
      header inclusion necessary to detect the fields of struct tm correctly.
      f667747b
  3. May 14, 2012
  4. 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
  5. May 11, 2012
  6. May 07, 2012
  7. May 03, 2012
  8. 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
  9. Mar 22, 2012
    • Tom Lane's avatar
      Fix configure's search for collateindex.pl. · f2386d71
      Tom Lane authored
      PGAC_PATH_COLLATEINDEX supposed that it could use AC_PATH_PROGS to search
      for collateindex.pl, but that macro will only accept files that are marked
      executable, and at least some DocBook installations don't mark the script
      executable (a case the docs Makefile was already prepared for).  Accept the
      script if it's present and readable in $DOCBOOKSTYLE/bin, and otherwise
      search the PATH as before.
      
      Having fixed that up, we don't need the fallback case that was in the docs
      Makefile, and instead can throw an understandable error if configure didn't
      find the script.  Per recent trouble report from John Lumby.
      f2386d71
  10. Feb 23, 2012
  11. Feb 20, 2012
  12. 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
  13. 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
  14. Jan 02, 2012
    • Tom Lane's avatar
      Use mutex hint bit in PPC LWARX instructions, where possible. · 5cfa8dd3
      Tom Lane authored
      The hint bit makes for a small but measurable performance improvement
      in access to contended spinlocks.
      
      On the other hand, some PPC chips give an illegal-instruction failure.
      There doesn't seem to be a completely bulletproof way to tell whether the
      hint bit will cause an illegal-instruction failure other than by trying
      it; but most if not all 64-bit PPC machines should accept it, so follow
      the Linux kernel's lead and assume it's okay to use it in 64-bit builds.
      Of course we must also check whether the assembler accepts the command,
      since even with a recent CPU the toolchain could be old.
      
      Patch by Manabu Ori, significantly modified by me.
      5cfa8dd3
    • Bruce Momjian's avatar
      Update copyright notices for year 2012. · e126958c
      Bruce Momjian authored
      e126958c
  15. Dec 27, 2011
    • Peter Eisentraut's avatar
      Remove support for on_exit() · d383c23f
      Peter Eisentraut authored
      All supported platforms support the C89 standard function atexit()
      (SunOS 4 probably being the last one not to), and supporting both
      makes the code clumsy.
      d383c23f
  16. Dec 14, 2011
  17. Dec 10, 2011
  18. Nov 29, 2011
  19. Nov 18, 2011
  20. Sep 10, 2011
    • Peter Eisentraut's avatar
      Add missing format attributes · 52ce2058
      Peter Eisentraut authored
      Add __attribute__ decorations for printf format checking to the places that
      were missing them.  Fix the resulting warnings.  Add
      -Wmissing-format-attribute to the standard set of warnings for GCC, so these
      don't happen again.
      
      The warning fixes here are relatively harmless.  The one serious problem
      discovered by this was already committed earlier in
      cf15fb5c.
      52ce2058
  21. Sep 01, 2011
  22. Aug 28, 2011
  23. Aug 18, 2011
    • Peter Eisentraut's avatar
      Improve detection of Python 3.2 installations · f8c2029e
      Peter Eisentraut authored
      Because of ABI tagging, the library version number might no longer be
      exactly the Python version number, so do extra lookups.  This affects
      installations without a shared library, such as ActiveState's
      installer.
      
      Also update the way to detect the location of the 'config' directory,
      which can also be versioned.
      
      Ashesh Vashi
      f8c2029e
  24. Aug 03, 2011
    • Robert Haas's avatar
      Make pgbench use erand48() rather than random(). · 4af43ee3
      Robert Haas authored
      glibc renders random() thread-safe by wrapping a futex lock around it;
      testing reveals that this limits the performance of pgbench on machines
      with many CPU cores.  Rather than switching to random_r(), which is
      only available on GNU systems and crashes unless you use undocumented
      alchemy to initialize the random state properly, switch to our built-in
      implementation of erand48(), which is both thread-safe and concurrent.
      
      Since the list of reasons not to use the operating system's erand48()
      is getting rather long, rename ours to pg_erand48() (and similarly
      for our implementations of lrand48() and srand48()) and just always
      use those.  We were already doing this on Cygwin anyway, and the
      glibc implementation is not quite thread-safe, so pgbench wouldn't
      be able to use that either.
      
      Per discussion with Tom Lane.
      4af43ee3
  25. Jul 26, 2011
  26. Jul 20, 2011
    • Tom Lane's avatar
      Rewrite libxml error handling to be more robust. · cacd42d6
      Tom Lane authored
      libxml reports some errors (like invalid xmlns attributes) via the error
      handler hook, but still returns a success indicator to the library caller.
      This causes us to miss some errors that are important to report.  Since the
      "generic" error handler hook doesn't know whether the message it's getting
      is for an error, warning, or notice, stop using that and instead start
      using the "structured" error handler hook, which gets enough information
      to be useful.
      
      While at it, arrange to save and restore the error handler hook setting in
      each libxml-using function, rather than assuming we can set and forget the
      hook.  This should improve the odds of working nicely with third-party
      libraries that also use libxml.
      
      In passing, volatile-ize some local variables that get modified within
      PG_TRY blocks.  I noticed this while testing with an older gcc version
      than I'd previously tried to compile xml.c with.
      
      Florian Pflug and Tom Lane, with extensive review/testing by Noah Misch
      cacd42d6
  27. Jun 16, 2011
    • Peter Eisentraut's avatar
      Start using flexible array members · dbbba527
      Peter Eisentraut authored
      Flexible array members are a C99 feature that avoids "cheating" in the
      declaration of variable-length arrays at the end of structs.  With
      Autoconf support, this should be transparent for older compilers.
      
      We start with one use in gist.h because gcc 4.6 started to raise a
      warning there.  Over time, it can be expanded to other places in the
      source, but they will likely need some review of sizeof and offsetof
      usage.  The current change in gist.h appears to be safe in this
      regard.
      dbbba527
  28. Jun 11, 2011
  29. Jun 10, 2011
  30. Jun 02, 2011
  31. May 31, 2011
    • Tom Lane's avatar
      Replace use of credential control messages with getsockopt(LOCAL_PEERCRED). · be4585b1
      Tom Lane authored
      It turns out the reason we hadn't found out about the portability issues
      with our credential-control-message code is that almost no modern platforms
      use that code at all; the ones that used to need it now offer getpeereid(),
      which we choose first.  The last holdout was NetBSD, and they added
      getpeereid() as of 5.0.  So far as I can tell, the only live platform on
      which that code was being exercised was Debian/kFreeBSD, ie, FreeBSD kernel
      with Linux userland --- since glibc doesn't provide getpeereid(), we fell
      back to the control message code.  However, the FreeBSD kernel provides a
      LOCAL_PEERCRED socket parameter that's functionally equivalent to Linux's
      SO_PEERCRED.  That is both much simpler to use than control messages, and
      superior because it doesn't require receiving a message from the other end
      at just the right time.
      
      Therefore, add code to use LOCAL_PEERCRED when necessary, and rip out all
      the credential-control-message code in the backend.  (libpq still has such
      code so that it can still talk to pre-9.1 servers ... but eventually we can
      get rid of it there too.)  Clean up related autoconf probes, too.
      
      This means that libpq's requirepeer parameter now works on exactly the same
      platforms where the backend supports peer authentication, so adjust the
      documentation accordingly.
      be4585b1
  32. May 26, 2011
    • Tom Lane's avatar
      Adjust configure to use "+Olibmerrno" with HP-UX C compiler, if possible. · 44404f39
      Tom Lane authored
      This is reported to be necessary on some versions of that OS.  In service
      of this, cause PGAC_PROG_CC_CFLAGS_OPT to reject switches that result in
      compiler warnings, since on yet other versions of that OS, the switch does
      nothing except provoke a warning.
      
      Report and patch by Ibrar Ahmed, further tweaking by me.
      44404f39
  33. May 24, 2011
  34. May 22, 2011
  35. May 06, 2011
    • Peter Eisentraut's avatar
      Improve compiler string shown in version() · 8dd2ede3
      Peter Eisentraut authored
      With some compilers such as Clang and ICC emulating GCC, using a
      version string of the form "GCC $version" can be quite misleading.
      Also, a great while ago, the version output from gcc --version started
      including the string "gcc", so it is redundant to repeat that.  In
      order to support ancient GCC versions, we now prefix the result with
      "GCC " only if the version output does not start with a letter.
      8dd2ede3
  36. Apr 27, 2011
  37. Apr 23, 2011
    • Tom Lane's avatar
      Fix char2wchar/wchar2char to support collations properly. · 2ab0796d
      Tom Lane authored
      These functions should take a pg_locale_t, not a collation OID, and should
      call mbstowcs_l/wcstombs_l where available.  Where those functions are not
      available, temporarily select the correct locale with uselocale().
      
      This change removes the bogus assumption that all locales selectable in
      a given database have the same wide-character conversion method; in
      particular, the collate.linux.utf8 regression test now passes with
      LC_CTYPE=C, so long as the database encoding is UTF8.
      
      I decided to move the char2wchar/wchar2char functions out of mbutils.c and
      into pg_locale.c, because they work on wchar_t not pg_wchar_t and thus
      don't really belong with the mbutils.c functions.  Keeping them where they
      were would have required importing pg_locale_t into pg_wchar.h somehow,
      which did not seem like a good plan.
      2ab0796d
Loading