{"id":19831,"date":"2022-10-18T20:18:00","date_gmt":"2022-10-18T18:18:00","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=19831"},"modified":"2022-10-18T21:51:39","modified_gmt":"2022-10-18T19:51:39","slug":"building-postgresql-with-meson","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/","title":{"rendered":"Building PostgreSQL with Meson"},"content":{"rendered":"\n<p>Last year, around this time, there started a thread on hackers which was about <a href=\"https:\/\/www.postgresql.org\/message-id\/flat\/20220809071055.rgikv3qn74ypnnbb%40awork3.anarazel.de#3c52f0debb4da1ff2c85cf2543bd8a4c\" target=\"_blank\" rel=\"noreferrer noopener\">building PostgreSQL with meson<\/a>. I didn&#8217;t know anything about <a href=\"https:\/\/mesonbuild.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">Meson<\/a> at this time, and don&#8217;t know much more right now, but as it  seems to be related to build times and times to get test results I though I&#8217;ll have a look (there are more, and even more serious reasons mentioned in the thread, but you can read that on your own).<\/p>\n\n\n\n<p>Getting Meson and <a href=\"https:\/\/ninja-build.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Ninja<\/a> (the backend systems by Meson by default) onto a <a href=\"https:\/\/www.debian.org\/\" target=\"_blank\" rel=\"noreferrer noopener\">Debian<\/a> 11 system is just installing the packages (pretty much the same for Red Hat base systems):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\npostgres@debian11pg:\/home\/postgres\/ &#x5B;pg16] sudo apt install -y meson ninja-build\n<\/pre><\/div>\n\n\n<p>One requirement of Meson is, that the build has to happen outside of the source tree, so lets create an empty directory for that:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\npostgres@debian11pg:\/home\/postgres\/ &#x5B;pg16] mkdir postgresql-build\npostgres@debian11pg:\/home\/postgres\/ &#x5B;pg16] cd postgresql-build\/\n<\/pre><\/div>\n\n\n<p>The source code of PostgreSQL in this case is on the same level as the build directory:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\npostgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] pwd\n\/home\/postgres\/postgresql-build\n11:58:49 postgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] ls ..\/postgresql\naclocal.m4  config  configure  configure.ac  contrib  COPYRIGHT  doc  GNUmakefile.in  HISTORY  Makefile  meson.build  meson_options.txt  postgresql-14-A4.pdf  README  README.git  src\n<\/pre><\/div>\n\n\n<p>We (dbi) usually define the location where we want to have PostgreSQL installed, the segment size and the block size be defining these variables:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\npostgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] PGHOME=\/var\/tmp\/pgsql\npostgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] SEGSIZE=2\npostgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] BLOCKSIZE=8\n<\/pre><\/div>\n\n\n<p>What usually follows is the configure phase, which we do like this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n.\/configure --prefix=${PGHOME} \\\n            --exec-prefix=${PGHOME} \\\n            --bindir=${PGHOME}\/bin \\\n            --libdir=${PGHOME}\/lib \\\n            --sysconfdir=${PGHOME}\/etc \\\n            --includedir=${PGHOME}\/include \\\n            --datarootdir=${PGHOME}\/share \\\n            --datadir=${PGHOME}\/share \\\n            --with-pgport=5432 \\\n            --with-perl \\\n            --with-python \\\n            --with-openssl \\\n            --with-pam \\\n            --with-ldap \\\n            --with-libxml \\\n            --with-libxslt \\\n            --with-segsize=${SEGSIZE} \\\n            --with-blocksize=${BLOCKSIZE} \\\n            --with-llvm LLVM_CONFIG=&#039;\/usr\/bin\/llvm-config&#039; \\\n            --with-uuid=ossp \\\n            --with-lz4 \\\n            --with-zstd \\\n            --with-gssapi \\\n            --with-systemd \\\n            --with-icu \\\n            --with-system-tzdata=\/usr\/share\/zoneinfo\n<\/pre><\/div>\n\n\n<p>With Meson this changes. First, we need to initialize the build directory (The first dot is the build directory, the second path is the location of the source code):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\npostgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] meson setup . ..\/postgresql\nThe Meson build system\nVersion: 0.56.2\nSource dir: \/home\/postgres\/postgresql\nBuild dir: \/home\/postgres\/postgresql-build\nBuild type: native build\nProject name: postgresql\nProject version: 16devel\nC compiler for the host machine: cc (gcc 10.2.1 &quot;cc (Debian 10.2.1-6) 10.2.1 20210110&quot;)\nC linker for the host machine: cc ld.bfd 2.35.2\nHost machine cpu family: x86_64\n...\nProgram xmllint found: NO\nConfiguring version.sgml using configuration\nMessage: checking for file conflicts between source and build directory\nBuild targets in project: 384\n\nFound ninja-1.10.1 at \/usr\/bin\/ninja\n<\/pre><\/div>\n\n\n<p>We could already have configured the build options with the setup stage, but now we can easily check what is available:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\npostgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] meson configure\nCore properties:\n  Source dir \/home\/postgres\/postgresql\n  Build dir  \/home\/postgres\/postgresql-build\n                                                                                                       \nMain project options:                                                                                  \n                                                                                                       \n  Core options        Current Value      Possible Values                                               Description\n  ------------        -------------      ---------------                                               -----------\n  auto_features       auto               &#x5B;enabled, disabled, auto]                                     Override value of all &#039;auto&#039; features\n  backend             ninja              &#x5B;ninja, vs, vs2010, vs2015, vs2017, vs2019, xcode]            Backend to use\n  buildtype           release            &#x5B;plain, debug, debugoptimized, release, minsize, custom]      Build type to use\n  debug               false              &#x5B;true, false]                                                 Debug\n  default_library     shared             &#x5B;shared, static, both]                                        Default library type\n  force_fallback_for  &#x5B;]                                                                               Force fallback for those subprojects\n  install_umask       0022               &#x5B;preserve, 0000-0777]                                         Default umask to apply on permissions of installed files\n  layout              mirror             &#x5B;mirror, flat]                                                Build directory layout\n  optimization        3                  &#x5B;0, g, 1, 2, 3, s]                                            Optimization level\n  strip               false              &#x5B;true, false]                                                 Strip targets on install\n  unity               off                &#x5B;on, off, subprojects]                                        Unity build\n  unity_size          4                  &gt;=2                                                           Unity block size\n  warning_level       1                  &#x5B;0, 1, 2, 3]                                                  Compiler warning level to use\n  werror              false              &#x5B;true, false]                                                 Treat warnings as errors\n  wrap_mode           default            &#x5B;default, nofallback, nodownload, forcefallback]              Wrap mode\n  cmake_prefix_path   &#x5B;]                                                                               List of additional prefixes for cmake to search\n  pkg_config_path     &#x5B;]                                                                               List of additional paths for pkg-config to search\n                                                                                                       \n  Backend options     Current Value      Possible Values                                               Description\n  ---------------     -------------      ---------------                                               -----------\n  backend_max_links   0                  &gt;=0                                                           Maximum number of linker processes to run or 0 for no limit\n                                                                                                       \n  Base options        Current Value      Possible Values                                               Description\n  ------------        -------------      ---------------                                               -----------\n  b_asneeded          true               &#x5B;true, false]                                                 Use -Wl,--as-needed when linking\n  b_colorout          always             &#x5B;auto, always, never]                                         Use colored output\n  b_coverage          false              &#x5B;true, false]                                                 Enable coverage tracking.\n  b_lto               false              &#x5B;true, false]                                                 Use link time optimization\n  b_lundef            true               &#x5B;true, false]                                                 Use -Wl,--no-undefined when linking\n  b_ndebug            false              &#x5B;true, false, if-release]                                     Disable asserts\n  b_pch               false              &#x5B;true, false]                                                 Use precompiled headers\n  b_pgo               off                &#x5B;off, generate, use]                                          Use profile guided optimization\n  b_pie               false              &#x5B;true, false]                                                 Build executables as position independent\n  b_sanitize          none               &#x5B;none, address, thread, undefined, memory, address,undefined] Code sanitizer to use\n  b_staticpic         true               &#x5B;true, false]                                                 Build static libraries as position independent\n                                                                                                       \n  Compiler options    Current Value      Possible Values                                               Description\n  ----------------    -------------      ---------------                                               -----------\n  c_args              &#x5B;]                                                                               Extra arguments passed to the c compiler\n  c_link_args         &#x5B;]                                                                               Extra arguments passed to the c linker\n  c_std               none               &#x5B;none, c89, c99, c11, c17, c18, c2x, gnu89, gnu99, gnu11,     C language standard to use\n                                          gnu17, gnu18, gnu2x]                                         \n                                                                                                       \n  Directories         Current Value      Possible Values                                               Description\n  -----------         -------------      ---------------                                               -----------\n  bindir              bin                                                                              Executable directory\n  datadir             share                                                                            Data file directory\n  includedir          include                                                                          Header file directory\n  infodir             share\/info                                                                       Info page directory\n  libdir              lib64                                                                            Library directory\n  libexecdir          libexec                                                                          Library executable directory\n  localedir           share\/locale                                                                     Locale data directory\n  localstatedir       var                                                                              Localstate data directory\n  mandir              share\/man                                                                        Manual page directory\n  prefix              \/usr\/local\/pgsql                                                                 Installation prefix\n  sbindir             sbin                                                                             System executable directory\n  sharedstatedir      com                                                                              Architecture-independent data directory\n  sysconfdir          etc                                                                              Sysconf data directory\n                                                                                                       \n  Testing options     Current Value      Possible Values                                               Description\n  ---------------     -------------      ---------------                                               -----------\n  errorlogs           true               &#x5B;true, false]                                                 Whether to print the logs from failing tests\n  stdsplit            true               &#x5B;true, false]                                                 Split stdout and stderr in test logs\n                                                                                                       \n  Project options     Current Value      Possible Values                                               Description\n  ---------------     -------------      ---------------                                               -----------\n  BISON               &#x5B;bison, win_bison]                                                               path to bison binary\n  DTRACE              dtrace                                                                           path to dtrace binary\n  FLEX                &#x5B;flex, win_flex]                                                                 path to flex binary\n  GZIP                gzip                                                                             path to gzip binary\n  LZ4                 lz4                                                                              path to lz4 binary\n  PERL                perl                                                                             path to perl binary\n  PG_TEST_EXTRA                                                                                        Enable selected extra tests\n  PROVE               prove                                                                            path to prove binary\n  PYTHON              &#x5B;python3, python]                                                                path to python binary\n  SED                 gsed                                                                             path to sed binary\n  TAR                 tar                                                                              path to tar binary\n  XMLLINT             xmllint                                                                          path to xmllint binary\n  XSLTPROC            xsltproc                                                                         path to xsltproc binary\n  ZIC                 zic                                                                              path to zic binary, when cross-compiling\n  ZSTD                zstd                                                                             path to zstd binary\n  atomics             true               &#x5B;true, false]                                                 whether to use atomic operations\n  blocksize           8                  &#x5B;1, 2, 4, 8, 16, 32]                                          set relation block size in kB\n  bonjour             auto               &#x5B;enabled, disabled, auto]                                     build with Bonjour support\n  bsd_auth            auto               &#x5B;enabled, disabled, auto]                                     build with BSD Authentication support\n  cassert             false              &#x5B;true, false]                                                 enable assertion checks (for debugging)\n  darwin_sysroot                                                                                       select a non-default sysroot path\n  dtrace              disabled           &#x5B;enabled, disabled, auto]                                     DTrace support\n  extra_include_dirs  &#x5B;]                                                                               non-default directories to be searched for headers\n  extra_lib_dirs      &#x5B;]                                                                               non-default directories to be searched for libs\n  extra_version                                                                                        append STRING to the PostgreSQL version number\n  gssapi              auto               &#x5B;enabled, disabled, auto]                                     GSSAPI support\n  icu                 auto               &#x5B;enabled, disabled, auto]                                     ICU support\n  krb_srvnam          postgres                                                                         Default Kerberos service principal for GSSAPI\n  ldap                auto               &#x5B;enabled, disabled, auto]                                     LDAP support\n  libedit_preferred   false              &#x5B;true, false]                                                 Prefer BSD Libedit over GNU Readline\n  libxml              auto               &#x5B;enabled, disabled, auto]                                     XML support\n  libxslt             auto               &#x5B;enabled, disabled, auto]                                     XSLT support in contrib\/xml2\n  llvm                disabled           &#x5B;enabled, disabled, auto]                                     whether to use llvm\n  lz4                 auto               &#x5B;enabled, disabled, auto]                                     LZ4 support\n  nls                 auto               &#x5B;enabled, disabled, auto]                                     native language support\n  pam                 auto               &#x5B;enabled, disabled, auto]                                     build with PAM support\n  pgport              5432               &gt;=1, &lt;=65535                                                  Default port number for server and clients\n  plperl              auto               &#x5B;enabled, disabled, auto]                                     build Perl modules (PL\/Perl)\n  plpython            auto               &#x5B;enabled, disabled, auto]                                     build Python modules (PL\/Python)\n  pltcl               auto               &#x5B;enabled, disabled, auto]                                     build with TCL support\n  readline            auto               &#x5B;enabled, disabled, auto]                                     use GNU Readline or BSD Libedit for editing\n  segsize             1                                                                                Segment size, in gigabytes\n  selinux             disabled           &#x5B;enabled, disabled, auto]                                     build with SELinux support\n  spinlocks           true               &#x5B;true, false]                                                 whether to use spinlocks\n  ssl                 none               &#x5B;none, openssl]                                               use LIB for SSL\/TLS support (openssl)\n  system_tzdata                                                                                        use system time zone data in specified directory\n  systemd             auto               &#x5B;enabled, disabled, auto]                                     build with systemd support\n  tap_tests           auto               &#x5B;enabled, disabled, auto]                                     Whether to enable tap tests\n  tcl_version         tcl                                                                              specify TCL version\n  uuid                none               &#x5B;none, bsd, e2fs, ossp]                                       build contrib\/uuid-ossp using LIB\n  wal_blocksize       8                  &#x5B;1, 2, 4, 8, 16, 32, 64]                                      WAL block size, in kilobytes\n  zlib                auto               &#x5B;enabled, disabled, auto]                                     whether to use zlib\n  zstd                auto               &#x5B;enabled, disabled, auto]                                     whether to use zstd\n\n<\/pre><\/div>\n\n\n<p>This is a really nice, human readable, overview of what options are available. To get something comparable to what the &#8220;.\/configure&#8221; is doing above we need this:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\npostgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] meson configure -Dprefix=${PGHOME} \\\n                -Dbindir=${PGHOME}\/bin \\\n                -Ddatadir=${PGHOME}\/share \\\n                -Dincludedir=${PGHOME}\/include \\\n                -Dlibdir=${PGHOME}\/lib \\\n                -Dsysconfdir=${PGHOME}\/etc \\\n                -Dpgport=5432 \\\n                -Dplperl=enabled \\\n                -Dplpython=enabled \\\n                -Dssl=openssl \\\n                -Dpam=enabled \\\n                -Dldap=enabled \\\n                -Dlibxml=enabled \\\n                -Dlibxslt=enabled \\\n                -Dsegsize=${SEGSIZE} \\\n                -Dblocksize=${BLOCKSIZE} \\\n                -Dllvm=enabled \\\n                -Duuid=ossp \\\n                -Dzstd=enabled \\\n                -Dlz4=enabled \\\n                -Dgssapi=enabled \\\n                -Dsystemd=enabled \\\n                -Dicu=enabled \\\n                -Dsystem_tzdata=\/usr\/share\/zoneinfo\n\n<\/pre><\/div>\n\n\n<p>That&#8217;s it, ready to compile (parallelism is detected by default):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\npostgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] ninja \n&#x5B;0\/1] Regenerating build files.\nThe Meson build system\nVersion: 0.56.2\nSource dir: \/home\/postgres\/postgresql\nBuild dir: \/home\/postgres\/postgresql-build\nBuild type: native build\nProject name: postgresql\nProject version: 16devel\n...\nConfiguring version.sgml using configuration\nMessage: checking for file conflicts between source and build directory\nBuild targets in project: 390\n\nOption prefix is: \/var\/tmp\/pgsql &#x5B;default: \/usr\/local\/pgsql]\nFound ninja-1.10.1 at \/usr\/bin\/ninja\n&#x5B;236\/1876] Compiling C object src\/interfaces\/libpq\/libpq.a.p\/fe-print.c.o\n&#x5B;1876\/1876] Linking target src\/interfaces\/ecpg\/test\/thread\/alloc\n<\/pre><\/div>\n\n\n<p>Ready to install:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; highlight: [1]; title: ; notranslate\" title=\"\">\npostgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] ninja install\n&#x5B;0\/1] Installing files.\nInstalling subdir \/home\/postgres\/postgresql\/src\/include\/access to \/var\/tmp\/pgsql\/include\/postgresql\/server\/access\nInstalling \/home\/postgres\/postgresql\/src\/include\/access\/rmgrlist.h to \/var\/tmp\/pgsql\/include\/postgresql\/server\/access\nInstalling \/home\/postgres\/postgresql\/src\/include\/access\/attmap.h to \/var\/tmp\/pgsql\/include\/postgresql\/server\/access\nInstalling \/home\/postgres\/postgresql\/src\/include\/access\/xlogrecovery.h to \/var\/tmp\/pgsql\/include\/postgresql\/server\/access\nInstalling \/home\/postgres\/postgresql\/src\/include\/access\/xlogarchive.h to \/var\/tmp\/pgsql\/include\/postgresql\/server\/access\n...\nInstalling \/home\/postgres\/postgresql\/src\/test\/perl\/PostgreSQL\/Test\/Utils.pm to \/var\/tmp\/pgsql\/lib\/postgresql\/pgxs\/src\/test\/perl\/PostgreSQL\/Test\nInstalling \/home\/postgres\/postgresql\/src\/test\/perl\/PostgreSQL\/Test\/SimpleTee.pm to \/var\/tmp\/pgsql\/lib\/postgresql\/pgxs\/src\/test\/perl\/PostgreSQL\/Test\nInstalling \/home\/postgres\/postgresql\/src\/test\/perl\/PostgreSQL\/Test\/RecursiveCopy.pm to \/var\/tmp\/pgsql\/lib\/postgresql\/pgxs\/src\/test\/perl\/PostgreSQL\/Test\nInstalling \/home\/postgres\/postgresql\/src\/test\/perl\/PostgreSQL\/Test\/Cluster.pm to \/var\/tmp\/pgsql\/lib\/postgresql\/pgxs\/src\/test\/perl\/PostgreSQL\/Test\n20:07:21 postgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] \n<\/pre><\/div>\n\n\n<p>Quite easy and all is there:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,29,30,39,43]; title: ; notranslate\" title=\"\">\npostgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] \/var\/tmp\/pgsql\/bin\/initdb -D \/var\/tmp\/dummy\nThe files belonging to this database system will be owned by user &quot;postgres&quot;.\nThis user must also own the server process.\n\nThe database cluster will be initialized with locale &quot;en_US.UTF-8&quot;.\nThe default database encoding has accordingly been set to &quot;UTF8&quot;.\nThe default text search configuration will be set to &quot;english&quot;.\n\nData page checksums are disabled.\n\ncreating directory \/var\/tmp\/dummy ... ok\ncreating subdirectories ... ok\nselecting dynamic shared memory implementation ... posix\nselecting default max_connections ... 100\nselecting default shared_buffers ... 128MB\nselecting default time zone ... Europe\/Zurich\ncreating configuration files ... ok\nrunning bootstrap script ... ok\nperforming post-bootstrap initialization ... ok\nsyncing data to disk ... ok\n\ninitdb: warning: enabling &quot;trust&quot; authentication for local connections\ninitdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.\n\nSuccess. You can now start the database server using:\n\n    \/var\/tmp\/pgsql\/bin\/pg_ctl -D \/var\/tmp\/dummy -l logfile start\n\npostgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] export PGPORT=8888\npostgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] \/var\/tmp\/pgsql\/bin\/pg_ctl -D \/var\/tmp\/dummy start \nwaiting for server to start....2022-10-18 20:10:29.674 CEST &#x5B;8469] LOG:  starting PostgreSQL 16devel on x86_64, compiled by gcc-10.2.1\n2022-10-18 20:10:29.675 CEST &#x5B;8469] LOG:  listening on IPv6 address &quot;::1&quot;, port 8888\n2022-10-18 20:10:29.675 CEST &#x5B;8469] LOG:  listening on IPv4 address &quot;127.0.0.1&quot;, port 8888\n2022-10-18 20:10:29.689 CEST &#x5B;8469] LOG:  listening on Unix socket &quot;\/tmp\/.s.PGSQL.8888&quot;\n2022-10-18 20:10:29.718 CEST &#x5B;8472] LOG:  database system was shut down at 2022-10-18 20:09:40 CEST\n2022-10-18 20:10:29.735 CEST &#x5B;8469] LOG:  database system is ready to accept connections\n done\nserver started\npostgres@debian11pg:\/home\/postgres\/postgresql-build\/ &#x5B;pg16] \/var\/tmp\/pgsql\/bin\/psql\npsql (16devel)\nType &quot;help&quot; for help.\n\npostgres=# select version();\n                       version                        \n------------------------------------------------------\n PostgreSQL 16devel on x86_64, compiled by gcc-10.2.1\n(1 row)\n<\/pre><\/div>\n\n\n<p>Not much more work than the traditional way,  but I like the output of the various steps. It is much easier to read. I did not do any tests, if this is really faster and did not look at other advantages of this approach. Maybe this will a topic for a follow up post. This should give you enough information to get started.<\/p>\n\n\n\n<p><a href=\"https:\/\/wiki.postgresql.org\/wiki\/Meson\" target=\"_blank\" rel=\"noreferrer noopener\">Last, but not least, there is a nice comparison of the &#8220;old&#8221; against the &#8220;new&#8221; commands in the PostgreSQL wiki.<\/a> The question is: Does &#8220;old&#8221; mean, the traditional way of building PostgreSQL will go away? Have a look at the bottom of the Wiki page to get an idea about what might be happening.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last year, around this time, there started a thread on hackers which was about building PostgreSQL with meson. I didn&#8217;t know anything about Meson at this time, and don&#8217;t know much more right now, but as it seems to be related to build times and times to get test results I though I&#8217;ll have a [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,198],"tags":[2727,2602],"type_dbi":[],"class_list":["post-19831","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","category-database-management","tag-meson","tag-postgresql-2"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Building PostgreSQL with Meson - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building PostgreSQL with Meson\" \/>\n<meta property=\"og:description\" content=\"Last year, around this time, there started a thread on hackers which was about building PostgreSQL with meson. I didn&#8217;t know anything about Meson at this time, and don&#8217;t know much more right now, but as it seems to be related to build times and times to get test results I though I&#8217;ll have a [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-18T18:18:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-10-18T19:51:39+00:00\" \/>\n<meta name=\"author\" content=\"Daniel Westermann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@westermanndanie\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Westermann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/building-postgresql-with-meson\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/building-postgresql-with-meson\\\/\"},\"author\":{\"name\":\"Daniel Westermann\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"headline\":\"Building PostgreSQL with Meson\",\"datePublished\":\"2022-10-18T18:18:00+00:00\",\"dateModified\":\"2022-10-18T19:51:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/building-postgresql-with-meson\\\/\"},\"wordCount\":403,\"commentCount\":0,\"keywords\":[\"Meson\",\"postgresql\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Database management\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/building-postgresql-with-meson\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/building-postgresql-with-meson\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/building-postgresql-with-meson\\\/\",\"name\":\"Building PostgreSQL with Meson - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2022-10-18T18:18:00+00:00\",\"dateModified\":\"2022-10-18T19:51:39+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/building-postgresql-with-meson\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/building-postgresql-with-meson\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/building-postgresql-with-meson\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building PostgreSQL with Meson\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/8d08e9bd996a89bd75c0286cbabf3c66\",\"name\":\"Daniel Westermann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"caption\":\"Daniel Westermann\"},\"description\":\"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\\\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.\",\"sameAs\":[\"https:\\\/\\\/x.com\\\/westermanndanie\"],\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/daniel-westermann\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Building PostgreSQL with Meson - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/","og_locale":"en_US","og_type":"article","og_title":"Building PostgreSQL with Meson","og_description":"Last year, around this time, there started a thread on hackers which was about building PostgreSQL with meson. I didn&#8217;t know anything about Meson at this time, and don&#8217;t know much more right now, but as it seems to be related to build times and times to get test results I though I&#8217;ll have a [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/","og_site_name":"dbi Blog","article_published_time":"2022-10-18T18:18:00+00:00","article_modified_time":"2022-10-18T19:51:39+00:00","author":"Daniel Westermann","twitter_card":"summary_large_image","twitter_creator":"@westermanndanie","twitter_misc":{"Written by":"Daniel Westermann","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/"},"author":{"name":"Daniel Westermann","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"headline":"Building PostgreSQL with Meson","datePublished":"2022-10-18T18:18:00+00:00","dateModified":"2022-10-18T19:51:39+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/"},"wordCount":403,"commentCount":0,"keywords":["Meson","postgresql"],"articleSection":["Database Administration &amp; Monitoring","Database management"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/","url":"https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/","name":"Building PostgreSQL with Meson - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2022-10-18T18:18:00+00:00","dateModified":"2022-10-18T19:51:39+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/building-postgresql-with-meson\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Building PostgreSQL with Meson"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66","name":"Daniel Westermann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","caption":"Daniel Westermann"},"description":"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.","sameAs":["https:\/\/x.com\/westermanndanie"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/19831","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=19831"}],"version-history":[{"count":23,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/19831\/revisions"}],"predecessor-version":[{"id":19897,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/19831\/revisions\/19897"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=19831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=19831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=19831"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=19831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}