gnu: lmdb: Update to 0.9.28.
[jackhill/guix/guix.git] / gnu / packages / databases.scm
index 79bc173..8ec2dc4 100644 (file)
@@ -23,7 +23,7 @@
 ;;; Copyright © 2017 Jelle Licht <jlicht@fsfe.org>
 ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
 ;;; Copyright © 2017 Arun Isaac <arunisaac@systemreboot.net>
-;;; Copyright © 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2017, 2018 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2017, 2018 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
@@ -37,7 +37,7 @@
 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
-;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2019, 2021 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2020 Pierre Neidhardt <mail@ambrevar.xyz>
 ;;; Copyright © 2020 Nicolò Balzarotti <nicolo@nixo.xyz>
 ;;; Copyright © 2020 Tanguy Le Carrour <tanguy@bioneland.org>
@@ -45,6 +45,9 @@
 ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
 ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
 ;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020 Vincent Legoll <vincent.legoll@gmail.com>
+;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
+;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnupg)
-  #:use-module (gnu packages guile)
-  #:use-module (gnu packages time)
   #:use-module (gnu packages golang)
+  #:use-module (gnu packages guile)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages jemalloc)
   #:use-module (gnu packages language)
   #:use-module (gnu packages libedit)
   #:use-module (gnu packages libevent)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages lisp)
+  #:use-module (gnu packages lisp-xyz)
   #:use-module (gnu packages logging)
   #:use-module (gnu packages man)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
   #:use-module (gnu packages python-crypto)
-  #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-science)
+  #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages terminals)
   #:use-module (gnu packages textutils)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages valgrind)
   #:use-module (gnu packages web)
@@ -516,14 +521,14 @@ mapping from string keys to string values.")
 (define-public memcached
   (package
     (name "memcached")
-    (version "1.5.20")
+    (version "1.6.9")
     (source
      (origin
        (method url-fetch)
        (uri (string-append
              "https://memcached.org/files/memcached-" version ".tar.gz"))
        (sha256
-        (base32 "1r511qr95q0ywdaql3pdjiwzkfqxhhfzb13ilvl7mznfm4iv1myg"))))
+        (base32 "1lcjy1b9krnb2gk72qd1fvivlfiyfvknfi3wngyvyk9ifzijr9nm"))))
     (build-system gnu-build-system)
     (inputs
      `(("libevent" ,libevent)
@@ -898,7 +903,7 @@ Language.")
 (define-public mariadb
   (package
     (name "mariadb")
-    (version "10.1.45")
+    (version "10.5.8")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://downloads.mariadb.com/MariaDB"
@@ -906,8 +911,7 @@ Language.")
                                   version ".tar.gz"))
               (sha256
                (base32
-                "1mfs0x4c0z7d306n128dxdawk3llk25vxif5zwl20fv1z5qhz3wx"))
-              (patches (search-patches "mariadb-client-test-32bit.patch"))
+                "1s3vfm73911cddjhgpcbkya6nz7ag2zygg56qqzwscn5ybv28j7b"))
               (modules '((guix build utils)))
               (snippet
                '(begin
@@ -925,8 +929,8 @@ Language.")
                   (for-each (lambda (file)
                               (unless (string-suffix? "CMakeLists.txt" file)
                                 (delete-file file)))
-                            (append (find-files "extra/yassl")
-                                    (find-files "pcre") (find-files "zlib")))
+                            (append (find-files "extra/wolfssl")
+                                    (find-files "zlib")))
                   #t))))
     (build-system cmake-build-system)
     (outputs '("out" "lib" "dev"))
@@ -957,6 +961,10 @@ Language.")
          "-DDEFAULT_COLLATION=utf8_general_ci"
          "-DMYSQL_DATADIR=/var/lib/mysql"
          "-DMYSQL_UNIX_ADDR=/run/mysqld/mysqld.sock"
+
+         ;; Do not install the benchmark suite.
+         "-DINSTALL_SQLBENCHDIR=false"
+
          (string-append "-DCMAKE_INSTALL_PREFIX=" (assoc-ref %outputs "lib"))
          (string-append "-DCMAKE_INSTALL_RPATH=" (assoc-ref %outputs "lib")
                         "/lib")
@@ -980,29 +988,32 @@ Language.")
          "-DINSTALL_SHAREDIR=share")
        #:phases
        (modify-phases %standard-phases
-         ,@(if (string-prefix? "arm" (%current-system))
-               ;; XXX: Because of the GCC 5 input, we need to hide GCC 7 from
-               ;; CPLUS_INCLUDE_PATH so that its headers do not shadow GCC 5.
-               '((add-after 'set-paths 'hide-default-gcc
-                   (lambda* (#:key inputs #:allow-other-keys)
-                     (let ((gcc (assoc-ref inputs "gcc")))
-                       (setenv "CPLUS_INCLUDE_PATH"
-                               (string-join
-                                (delete (string-append gcc "/include/c++")
-                                        (string-split (getenv "CPLUS_INCLUDE_PATH")
-                                                      #\:))
-                                ":"))
-                       #t))))
-               '())
-         (add-after 'unpack 'fix-pcre-detection
+         (add-after 'unpack 'adjust-output-references
            (lambda _
-             ;; The bundled PCRE in MariaDB has a patch that was upstreamed
-             ;; in version 8.34.  Unfortunately the upstream patch behaves
-             ;; slightly differently and the build system fails to detect it.
-             ;; See <https://bugs.exim.org/show_bug.cgi?id=2173>.
-             ;; XXX: Consider patching PCRE instead.
-             (substitute* "cmake/pcre.cmake"
-               ((" OR NOT PCRE_STACK_SIZE_OK") ""))
+             ;; The build system invariably prepends $CMAKE_INSTALL_PREFIX
+             ;; to other variables such as $INSTALL_INCLUDEDIR, which does
+             ;; not work when the latter uses an absolute file name.
+             (substitute* "libmariadb/mariadb_config/mariadb_config.c.in"
+               (("%s/@INSTALL_INCLUDEDIR@")
+                (string-append "@INSTALL_INCLUDEDIR@"))
+               ;; As of 10.5.8, the mariadb_config program tries to be
+               ;; clever and computes the installation directory relative
+               ;; to /proc/self/exe when running on Linux.  Make it fall
+               ;; back to the old behaviour.
+               (("defined\\(__linux__\\)")
+                "0"))
+             (substitute* "libmariadb/mariadb_config/libmariadb.pc.in"
+               (("\\$\\{prefix\\}/@INSTALL_INCLUDEDIR@")
+                "@INSTALL_INCLUDEDIR@"))
+             (substitute* "support-files/mariadb.pc.in"
+               (("^(include|bin|script|doc|man)dir=\\$\\{prefix\\}/" _ dir)
+                (string-append dir "dir=")))
+             (substitute* "include/CMakeLists.txt"
+               (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_INCLUDEDIR\\}")
+                "${INSTALL_INCLUDEDIR}"))
+             (substitute* "cmake/mariadb_connector_c.cmake"
+               (("\\\\\\$\\{CMAKE_INSTALL_PREFIX\\}/\\$\\{INSTALL_BINDIR\\}")
+                "${INSTALL_BINDIR}"))
              #t))
          (add-after 'unpack 'adjust-tests
            (lambda _
@@ -1010,28 +1021,29 @@ Language.")
                     '(;; These fail because root@hostname == root@localhost in
                       ;; the build environment, causing a user count mismatch.
                       ;; See <https://jira.mariadb.org/browse/MDEV-7761>.
+                      "funcs_1.is_columns_mysql"
                       "main.join_cache"
                       "main.explain_non_select"
                       "main.stat_tables"
                       "main.stat_tables_innodb"
+                      "main.upgrade_MDEV-19650"
                       "roles.acl_statistics"
 
+                      ;; FIXME: This test checks various table encodings and
+                      ;; fails because Guix defaults to UTF8 instead of the
+                      ;; upstream default latin1_swedish_ci.  It's not easily
+                      ;; substitutable because several encodings are tested.
+                      "main.sp2"
+
+                      ;; XXX: This test occasionally fails on i686-linux:
+                      ;; <https://jira.mariadb.org/browse/MDEV-24458>
+                      ,@(if (string-prefix? "i686" (%current-system))
+                            '("main.myisampack")
+                            '())
+
                       ;; This file contains a time bomb which makes it fail after
                       ;; 2030-12-31.  See <https://bugs.gnu.org/34351> for details.
-                      "main.mysqldump"
-
-                      ;; FIXME: This test fails on i686:
-                      ;; -myisampack: Can't create/write to file (Errcode: 17 "File exists")
-                      ;; +myisampack: Can't create/write to file (Errcode: 17 "File exists)
-                      ;; When running "myisampack --join=foo/t3 foo/t1 foo/t2"
-                      ;; (all three tables must exist and be identical)
-                      ;; in a loop it produces the same error around 1/240 times.
-                      ;; montywi on #maria suggested removing the real_end check in
-                      ;; "strings/my_vsnprintf.c" on line 503, yet it still does not
-                      ;; reach the ending quote occasionally.  Disable it for now.
-                      "main.myisampack"
-                      ;; FIXME: This test fails on armhf-linux:
-                      "mroonga/storage.index_read_multiple_double"))
+                      "main.mysqldump"))
 
                    ;; This file contains a list of known-flaky tests for this
                    ;; release.  Append our own items.
@@ -1042,9 +1054,10 @@ Language.")
                          disabled-tests)
                (close-port unstable-tests)
 
-               ;; XXX: This test fails because it expects a latin1 charset and
+               ;; XXX: These fail because they expect a latin1 charset and
                ;; collation.  See <https://jira.mariadb.org/browse/MDEV-21264>.
-               (substitute* "mysql-test/r/gis_notembedded.result"
+               (substitute* '("mysql-test/main/gis_notembedded.result"
+                              "mysql-test/main/system_mysql_db.result")
                  (("latin1_swedish_ci") "utf8_general_ci")
                  (("\tlatin1") "\tutf8"))
 
@@ -1077,6 +1090,10 @@ Language.")
                            "--testcase-timeout=40"
                            "--suite-timeout=600"
                            "--parallel" (number->string (parallel-job-count))
+                           ;; Skip the replication tests: they are very I/O
+                           ;; intensive and frequently causes indeterministic
+                           ;; failures even on powerful hardware.
+                           "--skip-rpl"
                            "--skip-test-list=unstable-tests"))
                  (format #t "test suite not run~%"))
              #t))
@@ -1087,56 +1104,57 @@ Language.")
                    (dev     (assoc-ref outputs "dev"))
                    (lib     (assoc-ref outputs "lib"))
                    (openssl (assoc-ref inputs "openssl")))
-              (substitute* (string-append out "/bin/mysql_install_db")
+              (substitute* (list (string-append out "/bin/mariadb-install-db")
+                                 (string-append out "/bin/mysql_install_db"))
                 (("basedir=\"\"")
-                 (string-append "basedir=\"" out "\"")))
-              ;; Remove unneeded files for testing.
+                 (string-append "basedir=\"" out "\""))
+                (("\\$basedir/share/mysql")
+                 (string-append lib "/share/mysql")))
+
               (with-directory-excursion lib
-                (for-each delete-file-recursively
-                          '("data" "mysql-test" "sql-bench"))
-                ;; And static libraries.
+                ;; Remove tests.
+                (delete-file-recursively "mysql-test")
+                ;; Remove static libraries.
                 (for-each delete-file (find-files "lib" "\\.a$")))
+
               (with-directory-excursion out
                 (delete-file "share/man/man1/mysql-test-run.pl.1")
                 ;; Delete huge and unnecessary executables.
-                (for-each delete-file (find-files "bin" "(test|embedded)")))
+                (for-each delete-file (find-files "bin" "test$")))
               (mkdir-p (string-append dev "/share"))
               (mkdir-p (string-append dev "/bin"))
+              (rename-file (string-append lib "/bin/mariadbd")
+                           (string-append out "/bin/mariadbd"))
               (rename-file (string-append lib "/bin/mysqld")
                            (string-append out "/bin/mysqld"))
-              (rename-file (string-append lib "/share/pkgconfig")
-                           (string-append dev "/share/pkgconfig"))
+              (mkdir-p (string-append dev "/lib"))
+              (rename-file (string-append lib "/lib/pkgconfig")
+                           (string-append dev "/lib/pkgconfig"))
+              (rename-file (string-append lib "/bin/mariadb_config")
+                           (string-append dev "/bin/mariadb_config"))
               (rename-file (string-append out "/bin/mysql_config")
                            (string-append dev "/bin/mysql_config"))
 
-
-              (substitute*  (string-append out "/bin/mysql_install_db")
-                (("\\$basedir/share/mysql")
-                 (string-append lib "/share/mysql")))
-
               ;; Embed an absolute reference to OpenSSL in mysql_config
               ;; and the pkg-config file to avoid propagation.
+              ;; XXX: how to do this for mariadb_config.c.in?
               (substitute* (list (string-append dev "/bin/mysql_config")
-                                 (string-append dev "/share/pkgconfig/mariadb.pc"))
+                                 (string-append dev "/lib/pkgconfig/mariadb.pc"))
                 (("-lssl -lcrypto" all)
                  (string-append "-L" openssl "/lib " all)))
 
               #t))))))
     (native-inputs
      `(("bison" ,bison)
-       ;; XXX: On armhf, use GCC 5 to work around <https://bugs.gnu.org/37605>.
-       ,@(if (string-prefix? "armhf" (%current-system))
-             `(("gcc@5" ,gcc-5))
-             '())
        ("perl" ,perl)))
     (inputs
      `(("jemalloc" ,jemalloc)
        ("libaio" ,libaio)
        ("libxml2" ,libxml2)
        ("ncurses" ,ncurses)
-       ("openssl" ,openssl-1.0)
+       ("openssl" ,openssl)
        ("pam" ,linux-pam)
-       ("pcre" ,pcre)
+       ("pcre2" ,pcre2)
        ("xz" ,xz)
        ("zlib" ,zlib)))
     ;; The test suite is very resource intensive and can take more than three
@@ -1152,7 +1170,7 @@ as a drop-in replacement of MySQL.")
 (define-public mariadb-connector-c
   (package
     (name "mariadb-connector-c")
-    (version "3.1.11")
+    (version "3.1.12")
     (source
      (origin
        (method url-fetch)
@@ -1160,8 +1178,9 @@ as a drop-in replacement of MySQL.")
              "https://downloads.mariadb.org/f/connector-c-" version
              "/mariadb-connector-c-" version "-src.tar.gz"
              "/from/https%3A//mirrors.ukfast.co.uk/sites/mariadb/?serve"))
+       (file-name (string-append name "-" version ".tar.gz"))
        (sha256
-        (base32 "03svzahdf7czjlm695c11r4bfd04qdqgx8r1vkpr1zlkjhwnqvry"))))
+        (base32 "0qzyahr8x9l1xz0l79wz3iahxz7648n1azc5yr7kx0dl113y2nig"))))
     (inputs
      `(("openssl" ,openssl)))
     (build-system cmake-build-system)
@@ -1174,21 +1193,27 @@ developed in C/C++ to MariaDB and MySQL databases.")
     (license license:lgpl2.1+)))
 
 ;; Don't forget to update the other postgresql packages when upgrading this one.
-(define-public postgresql
+(define-public postgresql-13
   (package
     (name "postgresql")
-    (version "10.13")
+    (replacement postgresql-13.2)
+    (version "13.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://ftp.postgresql.org/pub/source/v"
                                   version "/postgresql-" version ".tar.bz2"))
               (sha256
                (base32
-                "1qal0yp7a90yzya7hl56gsmw5fvacplrdhpn7h9gnbyr1i2iyw2d"))
+                "07z6zwr58dckaa97yl9ml240z83d1lhgaxw9aq49i8lsp21mqd0j"))
               (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl")
+     `(#:configure-flags '("--with-uuid=e2fs" "--with-openssl"
+                           ;; PostgreSQL installs its own Makefile (should it?).
+                           ;; Prevent it from retaining needless references to
+                           ;; the build tools in order to save size.
+                           "MKDIR_P=mkdir -p" "INSTALL_BIN=install -c"
+                           "LD=ld" "TAR=tar")
        #:phases
        (modify-phases %standard-phases
          (add-before 'configure 'patch-/bin/sh
@@ -1220,33 +1245,141 @@ TIMESTAMP.  It also supports storage of binary large objects, including
 pictures, sounds, or video.")
     (license (license:x11-style "file://COPYRIGHT"))))
 
-(define-public postgresql-10 postgresql)
+(define-public postgresql-13.2
+  (package
+    (inherit postgresql-13)
+    (name "postgresql")
+    (version "13.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://ftp.postgresql.org/pub/source/v"
+                                  version "/postgresql-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1z5d847jnajcfr3wa6jn52a8xjhamvwzmz18xlm5nvxqip8grmsz"))
+              (patches (search-patches "postgresql-disable-resolve_symlinks.patch"))))))
 
 (define-public postgresql-11
   (package
-    (inherit postgresql)
+    (inherit postgresql-13)
     (name "postgresql")
-    (version "11.6")
+    (version "11.11")
     (source (origin
-              (method url-fetch)
+              (inherit (package-source postgresql-13))
+              (uri (string-append "https://ftp.postgresql.org/pub/source/v"
+                                  version "/postgresql-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0v0qk298nxmpzpgsxcsxma328hdkyzd7fwjs0zsn6zavl5zpnq20"))))))
+
+(define-public postgresql-10
+  (package
+    (inherit postgresql-11)
+    (version "10.16")
+    (source (origin
+              (inherit (package-source postgresql-11))
               (uri (string-append "https://ftp.postgresql.org/pub/source/v"
                                   version "/postgresql-" version ".tar.bz2"))
               (sha256
                (base32
-                "0w1iq488kpzfgfnlw4k32lz5by695mpnkq461jrgsr99z5zlz4j9"))))))
+                "1cvv8qw0gkkczqhiwx6ns7w88dwkvdz4cvb2d4ff14363f5p2p53"))))))
 
 (define-public postgresql-9.6
   (package
-    (inherit postgresql)
-    (name "postgresql")
-    (version "9.6.16")
+    (inherit postgresql-10)
+    (version "9.6.21")
     (source (origin
-              (method url-fetch)
+              (inherit (package-source postgresql-10))
               (uri (string-append "https://ftp.postgresql.org/pub/source/v"
                                   version "/postgresql-" version ".tar.bz2"))
               (sha256
                (base32
-                "1rr2dgv4ams8r2lp13w85c77rkmzpb88fjlc28mvlw6zq2fblv2w"))))))
+                "0d0ngpadf1i7c0i2psaxcbmiwx8334ibcsn283n9fp4853pyl3wk"))))))
+
+(define-public postgresql postgresql-13)
+
+(define-public pgloader
+  (package
+    (name "pgloader")
+    (version "3.6.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/dimitri/pgloader")
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "06i1jd2za3ih5caj2b4vzlzags5j65vv8dfdbz0ggdrp40wfd5lh"))
+       (file-name (git-file-name name version))))
+    (build-system gnu-build-system)
+    (arguments
+     ;; NOTE: (Sharlatan-20210119T211511+0000) Tests are disabled due to being
+     ;; dependent on Quicklisp, main build target is `pgloader-standalone' which
+     ;; does not require Quicklisp workarounds. There is no `install' target
+     ;; configured in Makefile.
+     `(#:tests? #f
+       #:strip-binaries? #f
+       #:make-flags
+       (list "pgloader-standalone" "BUILDAPP_SBCL=buildapp")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'set-home
+           (lambda _
+             (setenv "HOME" "/tmp")
+             #t))
+         (add-after 'unpack 'patch-Makefile
+           (lambda _
+             (substitute* "Makefile"
+               (("--sbcl.*") "--sbcl $(CL) --asdf-path . \\\n"))
+             #t))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
+               (mkdir-p bin)
+               (install-file "build/bin/pgloader"  bin))
+             #t)))))
+    (native-inputs
+     `(("buildapp" ,buildapp)
+       ("sbcl" ,sbcl)))
+    (inputs
+     `(("alexandria" ,sbcl-alexandria)
+       ("cl-abnf" ,sbcl-cl-abnf)
+       ("cl-base64" ,sbcl-cl-base64)
+       ("cl-csv" ,sbcl-cl-csv)
+       ("cl-fad" ,sbcl-cl-fad)
+       ("cl-log" ,sbcl-cl-log)
+       ("cl-markdown" ,sbcl-cl-markdown)
+       ("cl-mustache" ,sbcl-cl-mustache)
+       ("cl-ppcre" ,sbcl-cl-ppcre)
+       ("cl-sqlite" ,sbcl-cl-sqlite)
+       ("closer-mop" ,sbcl-closer-mop)
+       ("command-line-arguments" ,sbcl-command-line-arguments)
+       ("db3" ,sbcl-db3)
+       ("drakma" ,sbcl-drakma)
+       ("esrap" ,sbcl-esrap)
+       ("flexi-streams" ,sbcl-flexi-streams)
+       ("ixf" ,sbcl-ixf)
+       ("local-time" ,sbcl-local-time)
+       ("lparallel" ,sbcl-lparallel)
+       ("metabang-bind" ,sbcl-metabang-bind)
+       ("mssql" ,sbcl-mssql)
+       ("postmodern" ,sbcl-postmodern)
+       ("py-configparser" ,sbcl-py-configparser)
+       ("qmynd" ,sbcl-qmynd)
+       ("quri" ,sbcl-quri)
+       ("split-sequence" ,sbcl-split-sequence)
+       ("trivial-backtrace" ,sbcl-trivial-backtrace)
+       ("usocket" ,sbcl-usocket)
+       ("uuid" ,sbcl-uuid)
+       ("yason" ,sbcl-yason)
+       ("zs3" ,sbcl-zs3)))
+    (home-page "https://pgloader.io/")
+    (synopsis "Tool to migrate data to PostgreSQL")
+    (description
+     "@code{pgloader} is a program that can load data or migrate databases from
+CSV, DB3, iXF, SQLite, MS-SQL or MySQL to PostgreSQL.")
+    (license (license:x11-style "file://LICENSE"))))
 
 (define-public python-pymysql
   (package
@@ -1323,7 +1456,7 @@ organized in a hash table or B+ tree.")
 
     (native-inputs `(("bc" ,bc)
                      ("bash:include" ,bash "include")
-                     ("check" ,check)
+                     ("check" ,check-0.14)
                      ("pkg-config" ,pkg-config)))
 
     ;; TODO: Add more optional inputs.
@@ -2086,7 +2219,7 @@ valid SQL query.")
 (define-public unixodbc
   (package
    (name "unixodbc")
-   (version "2.3.7")
+   (version "2.3.9")
    (source (origin
             (method url-fetch)
             (uri
@@ -2094,7 +2227,7 @@ valid SQL query.")
               "ftp://ftp.unixodbc.org/pub/unixODBC/unixODBC-"
               version ".tar.gz"))
             (sha256
-             (base32 "0xry3sg497wly8f7715a7gwkn2k36bcap0mvzjw74jj53yx6kwa5"))))
+             (base32 "01xj65d02i3yjy7p9z08y9jakcs5szmz4rask868n7387nn3x0sj"))))
    (build-system gnu-build-system)
    (synopsis "Data source abstraction library")
    (description "Unixodbc is a library providing an API with which to access
@@ -2133,19 +2266,43 @@ similar to BerkeleyDB, LevelDB, etc.")
 (define-public redis
   (package
     (name "redis")
-    (version "5.0.7")
+    (version "6.0.11")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://download.redis.io/releases/redis-"
                                   version".tar.gz"))
               (sha256
                (base32
-                "0ax8sf3vw0yadr41kzc04917scrg5wir1d94zmbz00b8pzm79nv1"))))
+                "0prwqap452m581nyc3cz642d1z3x9nd81896hlqdm3z8238z49y9"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; Delete bundled jemalloc, as the package will use the libc one
+               '(begin (delete-file-recursively "deps/jemalloc")
+                       #t))))
     (build-system gnu-build-system)
+    (native-inputs
+     `(("procps" ,procps) ; for tests
+       ("tcl" ,tcl)))     ; for tests
     (arguments
-     '(#:tests? #f ; tests related to master/slave and replication fail
-       #:phases (modify-phases %standard-phases
-                  (delete 'configure))
+     '(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-after 'unpack 'use-correct-tclsh
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "runtest"
+               (("^TCLSH=.*")
+                (string-append "TCLSH="
+                               (assoc-ref inputs "tcl")
+                               "/bin/tclsh")))
+             #t))
+         (add-after 'unpack 'adjust-tests
+           (lambda _
+             ;; Disable failing tests
+             (substitute* "tests/test_helper.tcl"
+               (("    integration/replication[^-]") "")
+               (("    integration/replication-4") "")
+               (("    integration/replication-psync") ""))
+             #t)))
        #:make-flags `("CC=gcc"
                       "MALLOC=libc"
                       "LDFLAGS=-ldl"
@@ -2161,14 +2318,14 @@ sets, bitmaps and hyperloglogs.")
 (define-public kyotocabinet
   (package
     (name "kyotocabinet")
-    (version "1.2.78")
+    (version "1.2.79")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://fallabs.com/kyotocabinet/pkg/"
                                   "kyotocabinet-" version ".tar.gz"))
               (sha256
                (base32
-                "1bxkf9kmcavq9rqridb8mvmrk3hj4447ffi24m2admsbm61n6k29"))))
+                "079ymsahlrijswgwfr2la9yw5h57l752cprhp5dz31iamsj1vyv7"))))
     (build-system gnu-build-system)
     (arguments
      `(#:configure-flags
@@ -2336,7 +2493,7 @@ database.")
 (define-public lmdb
   (package
     (name "lmdb")
-    (version "0.9.26")
+    (version "0.9.28")
     (source
      (origin
        (method git-fetch)
@@ -2345,7 +2502,7 @@ database.")
              (commit (string-append "LMDB_" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0323xwb2rqyrr9vr6gbxc2kl89drhqw0ifmyh9pg9qgqmymyhxdx"))))
+        (base32 "012a8bs49cswsnzw7k4piis5b6dn4by85w7a7mai9i04xcjyy9as"))))
     (build-system gnu-build-system)
     (arguments
      `(#:test-target "test"
@@ -2356,7 +2513,25 @@ database.")
              (chdir "libraries/liblmdb")
              (substitute* "Makefile"
                (("/usr/local") (assoc-ref outputs "out")))
-            #t)))))
+            #t))
+         (add-after 'install 'create-pkg-config-file
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (mkdir-p (string-append out "/lib/pkgconfig"))
+               (with-output-to-file (string-append out "/lib/pkgconfig/liblmdb.pc")
+                 (lambda _
+                   (format #t "prefix=~a~@
+                           exec_prefix=~a~@
+                           libdir=~a/lib~@
+                           includedir=~a/include~@
+                           ~@
+                           Name: liblmdb~@
+                           Version: ~a~@
+                           Description: Lightning Memory-Mapped Database library~@
+                           Libs: -L${libdir} -llmdb~@
+                           Cflags: -I${includedir}~%"
+                           out out out out ,version)))
+                 #t))))))
     (home-page "https://symas.com/lmdb/")
     (synopsis "Lightning Memory-Mapped Database library")
     (description
@@ -3222,8 +3397,7 @@ files or Python scripts that define a list of migration steps.")
     (build-system python-build-system)
     (arguments '(#:tests? #f))          ;XXX: requires a live database
     (inputs
-     `(("mysql" ,mariadb "lib")
-       ("mysql-dev" ,mariadb "dev")))
+     `(("mysql-dev" ,mariadb "dev")))
     (home-page "https://github.com/PyMySQL/mysqlclient-python")
     (synopsis "MySQLdb is an interface to the popular MySQL database server for Python")
     (description "MySQLdb is an interface to the popular MySQL database server
@@ -3614,7 +3788,7 @@ Monitor read/write activity on a mongo server
 (define-public apache-arrow
   (package
     (name "apache-arrow")
-    (version "0.17.1")
+    (version "3.0.0")
     (source
      (origin
        (method git-fetch)
@@ -3624,7 +3798,7 @@ Monitor read/write activity on a mongo server
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "02r6yx3yhywzikd3b0vfkjgddhfiriyx2vpm3jf5880wq59x798a"))))
+         "03ngddh3r1g6f9aja2jlfksgvgyzmxmfy4bxvzjrcv5fvl5x8ii0"))))
     (build-system cmake-build-system)
     (arguments
      `(#:tests? #f
@@ -3702,23 +3876,24 @@ Monitor read/write activity on a mongo server
              ;;"-DBENCHMARK_ENABLE_TESTING=OFF"
              "-DARROW_BUILD_STATIC=OFF")))
     (inputs
-     `(("boost" ,boost)
+     `(("apache-thrift" ,apache-thrift "lib")
+       ("boost" ,boost)
        ("brotli" ,google-brotli)
+       ("bzip2" ,bzip2)
        ("double-conversion" ,double-conversion)
-       ("snappy" ,snappy)
        ("gflags" ,gflags)
        ("glog" ,glog)
-       ("apache-thrift" ,apache-thrift "lib")
+       ("grpc" ,grpc)
+       ("lz4" ,lz4)
        ("protobuf" ,protobuf)
+       ("python-3" ,python)
+       ("python-numpy" ,python-numpy)
        ("rapidjson" ,rapidjson)
-       ("zlib" ,zlib)
-       ("bzip2" ,bzip2)
-       ("lz4" ,lz4)
-       ("zstd" ,zstd "lib")
        ("re2" ,re2)
-       ("grpc" ,grpc)
-       ("python-3" ,python)
-       ("python-numpy" ,python-numpy)))
+       ("snappy" ,snappy)
+       ("utf8proc" ,utf8proc)
+       ("zlib" ,zlib)
+       ("zstd" ,zstd "lib")))
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (outputs '("out" "lib" "include"))
@@ -3768,9 +3943,6 @@ implementation, along with tools for interoperability with pandas, NumPy, and
 other traditional Python scientific computing packages.")
     (license license:asl2.0)))
 
-(define-public python2-pyarrow
-  (package-with-python2 python-pyarrow))
-
 (define-public python-crate
   (package
     (name "python-crate")
@@ -3856,6 +4028,7 @@ simultaneous database connections by using this framework.")
                "--with-sqlite3"
                (string-append "--with-sqlite-incdir=" sqlite "/include")
                (string-append "--with-sqlite-libdir=" sqlite "/lib")))
+       #:tests? #f  ; FIXME: Find why the tests get stuck forever.
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'fix-tests
@@ -3905,8 +4078,7 @@ The drivers officially supported by @code{libdbi} are:
        ("sqlite" ,sqlite)
        ("odbc" ,unixodbc)
        ("boost" ,boost)
-       ("mariadb:dev" ,mariadb "dev")
-       ("mariadb:lib" ,mariadb "lib")))
+       ("mariadb:dev" ,mariadb "dev")))
     (arguments
      `(#:configure-flags
        ;; C++11 (-DSOCI_CXX11) is OFF by default.  hyperledger-iroha needs it.
@@ -3919,3 +4091,26 @@ The drivers officially supported by @code{libdbi} are:
 PostreSQL, SQLite, ODBC and MySQL.")
     (home-page "http://soci.sourceforge.net/")
     (license license:boost1.0)))
+
+(define-public freetds
+  (package
+    (name "freetds")
+    (version "1.2.18")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://www.freetds.org/files/stable/"
+                           "freetds-" version ".tar.gz"))
+       (sha256
+        (base32 "1hspvwxwdd1apadsy2b40dpjik8kfwcvdamvhpg3lnm15n02fb50"))))
+    (build-system gnu-build-system)
+    (arguments
+     ;; NOTE: (Sharlatan-20210110213908+0000) some tests require DB connection,
+     ;; disabled for now.
+     `(#:tests? #f))
+    (home-page "https://www.freetds.org/")
+    (synopsis "Client libraries for MS SQL and Sybase servers")
+    (description
+     "FreeTDS is an implementation of the Tabular DataStream protocol, used for
+connecting to MS SQL and Sybase servers over TCP/IP.")
+    (license license:lgpl2.0+)))