{"id":36,"date":"2020-10-26T15:00:55","date_gmt":"2020-10-26T14:00:55","guid":{"rendered":"https:\/\/ptdb.ch\/?p=36"},"modified":"2020-10-26T15:00:55","modified_gmt":"2020-10-26T14:00:55","slug":"how-to-compile-postgresql-13-on-centos-8-2","status":"publish","type":"post","link":"https:\/\/ptdb.ch\/?p=36","title":{"rendered":"How To Compile PostgreSQL 13 on CentOS 8.2"},"content":{"rendered":"<p>There are many reasons why you want to compile PostgreSQL yourself. E.g. customized block size, customized set of features, however, the most important one for me is the ability to do multi-homing.<br \/>\nBy multi-homing I mean, that you can run as many different PostgreSQL versions as you wish.<\/p>\n<p>e.g.<br \/>\n..\/pgproduct\/pg-13.0<br \/>\n..\/pgproduct\/pg-12.4<br \/>\n..\/pgproduct\/pg-12.3<br \/>\n..\/pgproduct\/pg-11.6<\/p>\n<p>and so on.<\/p>\n<p>The beauty of having multi-homing is that you don&#8217;t need to upgrade all your instances at once. You can do it one by one, which in turn makes it easier to organize downtimes for the affected applications.<br \/>\nLets say, you have 10 PostgreSQL instances running, and each is responsible for a different application, Then you don&#8217;t need to upgrade all at once from 12.3 to 12.4. You can do it one by one.<\/p>\n<p>So lets get started.<\/p>\n<p>Before we compile the PostgreSQL software, we have to make sure that a bunch of packages are installed. Not all of them, which are listed below are necessary, but these are the one&#8217;s I usually install.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@ocm199 \/]# dnf install kernel-doc.noarch gcc-c++ iotop nfs-utils libXrender xorg-x11-utils.x86_64 xorg-x11-xauth.x86_64 \\\n&gt; dos2unix libXScrnSaver kernel-devel.x86_64 fuse-libs.x86_64 m4 nscd binutils \\\n&gt; glibc.i686 glibc-devel.x86_64 glibc-devel.i686 glibc-devel.x86_64 libaio.i686 libaio.x86_64 \\\n&gt; libaio-devel.i686 libaio-devel.x86_64 libX11.i686 libX11.x86_64 libXau.i686 libXau.x86_64 libXi.i686 libXi.x86_64 \\\n&gt; libXtst.i686 libXtst.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 \\\n&gt; libstdc++-devel.x86_64 libxcb.i686 libxcb.x86_64 \\\n&gt; smartmontools sysstat sg3_utils gcc make bison flex zlib-devel openssh-clients bzip2 \\\n&gt; net-tools ksh unzip systemd-devel.x86_64 readline-devel.x86_64 openssl-libs.x86_64 openssl-devel.x86_64 \\\n&gt; pam-devel.x86_64 libxml2-devel.x86_64 libxslt-devel.x86_64 openldap-devel.x86_64 \\\n&gt; tcl tcl-devel.x86_64 rsync libcurl-devel.x86_64 \\\n&gt; platform-python-devel.i686 platform-python-devel.x86_64 \\\n&gt; perl-DBI.x86_64 perl-DBD-Pg.x86_64 perl-Time-HiRes.x86_64 perl-TermReadKey.x86_64 perl-Digest-MD5.x86_64 \\\n&gt; perl-ExtUtils-Embed.noarch perl-ExtUtils-MakeMaker.noarch \\\n&gt; python3-dateutil.noarch python3-psycopg2.x86_64 python3-argcomplete.noarch python3-argh.noarch \\\n&gt; llvm.x86_64 llvm-devel.x86_64 llvm-libs.x86_64 clang\nLast metadata expiration check: 1:31:36 ago on Mon 26 Oct 2020 07:23:07 AM EDT.\nPackage kernel-doc-4.18.0-193.19.1.el8_2.noarch is already installed.\nPackage gcc-c++-8.3.1-5.el8.0.2.x86_64 is already installed.\nPackage iotop-0.6-16.el8.noarch is already installed.\nPackage nfs-utils-1:2.3.3-31.el8.x86_64 is already installed.\nPackage libXrender-0.9.10-7.el8.x86_64 is already installed.\nPackage xorg-x11-utils-7.5-28.el8.x86_64 is already installed.\nPackage xorg-x11-xauth-1:1.0.9-12.el8.x86_64 is already installed.\nPackage dos2unix-7.4.0-3.el8.x86_64 is already installed.\nPackage libXScrnSaver-1.2.3-1.el8.x86_64 is already installed.\nPackage kernel-devel-4.18.0-147.8.1.el8_1.x86_64 is already installed.\nPackage kernel-devel-4.18.0-193.14.2.el8_2.x86_64 is already installed.\nPackage kernel-devel-4.18.0-193.19.1.el8_2.x86_64 is already installed.\nPackage fuse-libs-2.9.7-12.el8.x86_64 is already installed.\nPackage m4-1.4.18-7.el8.x86_64 is already installed.\nPackage nscd-2.28-101.el8.x86_64 is already installed.\nPackage binutils-2.30-73.el8.x86_64 is already installed.\nPackage glibc-2.28-101.el8.i686 is already installed.\nPackage glibc-devel-2.28-101.el8.x86_64 is already installed.\nPackage glibc-devel-2.28-101.el8.i686 is already installed.\nPackage libaio-0.3.112-1.el8.i686 is already installed.\nPackage libaio-0.3.112-1.el8.x86_64 is already installed.\nPackage libaio-devel-0.3.112-1.el8.i686 is already installed.\nPackage libaio-devel-0.3.112-1.el8.x86_64 is already installed.\nPackage libX11-1.6.8-3.el8.i686 is already installed.\nPackage libX11-1.6.8-3.el8.x86_64 is already installed.\nPackage libXau-1.0.8-13.el8.i686 is already installed.\nPackage libXau-1.0.8-13.el8.x86_64 is already installed.\nPackage libXi-1.7.9-7.el8.i686 is already installed.\nPackage libXi-1.7.9-7.el8.x86_64 is already installed.\nPackage libXtst-1.2.3-7.el8.i686 is already installed.\nPackage libXtst-1.2.3-7.el8.x86_64 is already installed.\nPackage libgcc-8.3.1-5.el8.0.2.i686 is already installed.\nPackage libgcc-8.3.1-5.el8.0.2.x86_64 is already installed.\nPackage libstdc++-8.3.1-5.el8.0.2.i686 is already installed.\nPackage libstdc++-8.3.1-5.el8.0.2.x86_64 is already installed.\nPackage libstdc++-devel-8.3.1-5.el8.0.2.i686 is already installed.\nPackage libstdc++-devel-8.3.1-5.el8.0.2.x86_64 is already installed.\nPackage libxcb-1.13.1-1.el8.i686 is already installed.\nPackage libxcb-1.13.1-1.el8.x86_64 is already installed.\nPackage smartmontools-1:6.6-3.el8.x86_64 is already installed.\nPackage sysstat-11.7.3-2.el8.x86_64 is already installed.\nPackage sg3_utils-1.44-5.el8.x86_64 is already installed.\nPackage gcc-8.3.1-5.el8.0.2.x86_64 is already installed.\nPackage make-1:4.2.1-10.el8.x86_64 is already installed.\nPackage bison-3.0.4-10.el8.x86_64 is already installed.\nPackage flex-2.6.1-9.el8.x86_64 is already installed.\nPackage zlib-devel-1.2.11-16.el8_2.x86_64 is already installed.\nPackage openssh-clients-8.0p1-4.el8_1.x86_64 is already installed.\nPackage bzip2-1.0.6-26.el8.x86_64 is already installed.\nPackage net-tools-2.0-0.51.20160912git.el8.x86_64 is already installed.\nPackage ksh-20120801-254.el8.x86_64 is already installed.\nPackage unzip-6.0-43.el8.x86_64 is already installed.\nPackage systemd-devel-239-31.el8_2.2.x86_64 is already installed.\nPackage readline-devel-7.0-10.el8.x86_64 is already installed.\nPackage openssl-libs-1:1.1.1c-15.el8.x86_64 is already installed.\nPackage openssl-devel-1:1.1.1c-15.el8.x86_64 is already installed.\nPackage pam-devel-1.3.1-8.el8.x86_64 is already installed.\nPackage libxml2-devel-2.9.7-7.el8.x86_64 is already installed.\nPackage libxslt-devel-1.1.32-4.el8.x86_64 is already installed.\nPackage openldap-devel-2.4.46-11.el8_1.x86_64 is already installed.\nPackage tcl-1:8.6.8-2.el8.x86_64 is already installed.\nPackage tcl-devel-1:8.6.8-2.el8.x86_64 is already installed.\nPackage rsync-3.1.3-7.el8.x86_64 is already installed.\nPackage libcurl-devel-7.61.1-12.el8.x86_64 is already installed.\nPackage platform-python-devel-3.6.8-23.el8.i686 is already installed.\nPackage platform-python-devel-3.6.8-23.el8.x86_64 is already installed.\nPackage perl-DBI-1.641-3.module_el8.1.0+199+8f0a6bbd.x86_64 is already installed.\nPackage perl-DBD-Pg-3.7.4-4.module_el8.1.0+268+81255909.x86_64 is already installed.\nPackage perl-Time-HiRes-1.9758-1.el8.x86_64 is already installed.\nPackage perl-TermReadKey-2.37-7.el8.x86_64 is already installed.\nPackage perl-Digest-MD5-2.55-396.el8.x86_64 is already installed.\nPackage perl-ExtUtils-Embed-1.34-416.el8.noarch is already installed.\nPackage perl-ExtUtils-MakeMaker-1:7.34-1.el8.noarch is already installed.\nPackage python3-dateutil-1:2.6.1-6.el8.noarch is already installed.\nPackage python3-psycopg2-2.7.5-7.el8.x86_64 is already installed.\nPackage python3-argcomplete-1.9.3-6.el8.noarch is already installed.\nPackage python3-argh-0.26.1-8.el8.noarch is already installed.\nPackage llvm-9.0.1-5.module_el8.2.0+461+2e15bd5f.x86_64 is already installed.\nPackage llvm-devel-9.0.1-5.module_el8.2.0+461+2e15bd5f.x86_64 is already installed.\nPackage llvm-libs-9.0.1-5.module_el8.2.0+461+2e15bd5f.x86_64 is already installed.\nPackage clang-9.0.1-2.module_el8.2.0+309+0c7b6b03.x86_64 is already installed.\nDependencies resolved.\nNothing to do.\nComplete!\n&#x5B;root@ocm199 \/]#\n<\/pre>\n<p>After the packages are installed, I would recommend to create a logging directory for the 13.0 compilation logs, so that you can check through all of them for any errors or warnings. But again, this is an optional step.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;postgres@ocm199 ~]$ mkdir -p ~\/tmp\/PG_13.0\/\n&#x5B;postgres@ocm199 ~]$\n<\/pre>\n<p>Now we can create the staging directory for PostgreSQL 13.0. This is the place where we put the source code in.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;postgres@ocm199 ~]$ mkdir -p \/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\n&#x5B;postgres@ocm199 ~]$\n<\/pre>\n<p>Download the following files from <a href=\"https:\/\/www.postgresql.org\/ftp\/source\/v13.0\/\">https:\/\/www.postgresql.org\/ftp\/source\/v13.0\/<\/a><br \/>\nand copy them to the staging directory.<\/p>\n<p>postgresql-13.0.tar.gz<br \/>\npostgresql-13.0.tar.gz.md5<\/p>\n<p>Before we continue, check the md5 checksum of the tar.gz file. They have to be the same. If they are not, stop here! Don&#8217;t continue.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;postgres@ocm199 ~]$ cd \/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\n&#x5B;postgres@ocm199 13.0]$ diff &lt;(md5sum postgresql-13.0.tar.gz) &lt;(cat postgresql-13.0.tar.gz.md5)\n&#x5B;postgres@ocm199 13.0]$\n<\/pre>\n<p>The next step is to create the new PostgreSQL home destination directory, and to unpack the new PostgreSQL tar.gz file.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;postgres@ocm199 ~]$ mkdir -p \/u01\/app\/postgres\/pgproduct\/pg-13.0\n&#x5B;postgres@ocm199 ~]$\n&#x5B;postgres@ocm199 ~]$ cd \/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\n&#x5B;postgres@ocm199 13.0]$ tar -xzvf postgresql-13.0.tar.gz\n...\n...\npostgresql-13.0\/doc\/MISSING_FEATURES\npostgresql-13.0\/HISTORY\npostgresql-13.0\/Makefile\npostgresql-13.0\/README\npostgresql-13.0\/COPYRIGHT\npostgresql-13.0\/GNUmakefile.in\npostgresql-13.0\/.gitattributes\npostgresql-13.0\/aclocal.m4\npostgresql-13.0\/configure.in\npostgresql-13.0\/INSTALL\n&#x5B;postgres@ocm199 13.0]$\n<\/pre>\n<p>Finally we can start with the compilation of the new software. There are 3 environment variables which I set before running the .\/configure command. PGHOME which is self explainatory, and SEGSIZE + BLOCKSIZE which are explained below.<\/p>\n<ul>\n<li>SEGSIZE: Set the segment size, in gigabytes. Large tables are divided into multiple operating-system files, each of size equal to the segment size. This avoids problems with file size limits that exist on many platforms. The default segment size, 1 gigabyte, is safe on all supported platforms. If your operating system has \u201clargefile\u201d support (which most do, nowadays), you can use a larger segment size. This can be helpful to reduce the number of file descriptors consumed when working with very large tables. But be careful not to select a value larger than is supported by your platform and the file systems you intend to use. Other tools you might wish to use, such as tar, could also set limits on the usable file size. It is recommended, though not absolutely required, that this value be a power of 2. Note that changing this value requires an initdb<\/li>\n<li>BLOCKSIZE: Set the block size, in kilobytes. This is the unit of storage and I\/O within tables. The default, 8 kilobytes, is suitable for most situations; but other values may be useful in special cases. The value must be a power of 2 between 1 and 32 (kilobytes). Note that changing this value requires an initdb.<\/li>\n<\/ul>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;postgres@ocm199 ~]$ cd \/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\n&#x5B;postgres@ocm199 postgresql-13.0]$ export PGHOME=\/u01\/app\/postgres\/pgproduct\/pg-13.0\n&#x5B;postgres@ocm199 postgresql-13.0]$ export SEGSIZE=4\n&#x5B;postgres@ocm199 postgresql-13.0]$ export BLOCKSIZE=8\n&#x5B;postgres@ocm199 postgresql-13.0]$ export Date=`date +&quot;%Y%m%d%H%M%S&quot;`\n&#x5B;postgres@ocm199 postgresql-13.0]$ .\/configure --prefix=${PGHOME} \\\n&gt; --exec-prefix=${PGHOME} --bindir=${PGHOME}\/bin \\\n&gt; --libdir=${PGHOME}\/lib --sysconfdir=${PGHOME}\/etc \\\n&gt; --includedir=${PGHOME}\/include \\\n&gt; --datarootdir=${PGHOME}\/share \\\n&gt; --datadir=${PGHOME}\/share \\\n&gt; --with-pgport=55000 \\\n&gt; --with-perl --with-python \\\n&gt; --with-tcl --with-openssl \\\n&gt; --with-pam --with-ldap \\\n&gt; --with-libxml --with-libxslt \\\n&gt; --with-systemd \\\n&gt; --with-segsize=${SEGSIZE} \\\n&gt; --with-blocksize=${BLOCKSIZE} \\\n&gt; --with-llvm LLVM_CONFIG='\/usr\/bin\/llvm-config-64' \\\n&gt; --with-extra-version=&quot; - Pt(78)DB PostgreSQL 13.0 JIT Build&quot; | tee -a ~\/tmp\/PG_13.0\/PG13.0.with_JIT.configure.log.${Date}\n\nchecking build system type... x86_64-pc-linux-gnu\nchecking host system type... x86_64-pc-linux-gnu\nchecking which template to use... linux\nchecking whether NLS is wanted... no\nchecking for default port number... 55000\nchecking for block size... 8kB\nchecking for segment size... 4GB\nchecking for WAL block size... 8kB\nchecking for gcc... gcc\nchecking whether the C compiler works... yes\nchecking for C compiler default output file name... a.out\nchecking for suffix of executables...\nchecking whether we are cross compiling... no\nchecking for suffix of object files... o\nchecking whether we are using the GNU C compiler... yes\nchecking whether gcc accepts -g... yes\n...\n...\nconfig.status: linking src\/backend\/port\/posix_sema.c to src\/backend\/port\/pg_sema.c\nconfig.status: linking src\/backend\/port\/sysv_shmem.c to src\/backend\/port\/pg_shmem.c\nconfig.status: linking src\/include\/port\/linux.h to src\/include\/pg_config_os.h\nconfig.status: linking src\/makefiles\/Makefile.linux to src\/Makefile.port\n&#x5B;postgres@ocm199 postgresql-13.0]$\n<\/pre>\n<p>After the configure command finished, check the configure log file ~\/tmp\/PG_13.0\/PG13.0.with_JIT.configure.log.${Date} which we created beforehand for any errors. A more detailed log file is the config.log which should be checked as well.<\/p>\n<p>The config.log file is created in the following directory in case you have any issues \/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0<\/p>\n<p>I also recommend to backup the config.log to our ~\/tmp\/PG_13.0\/ directory.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;postgres@ocm199 postgresql-13.0]$ mv config.log ~\/tmp\/PG_13.0\/PG13.0.run_configure.log.${Date}\n&#x5B;postgres@ocm199 postgresql-13.0]$\n<\/pre>\n<p>Now its time to start the make command. The option -j specifies the number of jobs (commands) to run simultaneously.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;postgres@ocm199 postgresql-13.0]$ make -j 4 world | tee -a ~\/tmp\/PG_13.0\/PG13.0.make.world.log.${Date}\nmake -C .\/src\/backend generated-headers\nmake&#x5B;1]: Entering directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/src\/backend'\nmake -C catalog distprep generated-header-symlinks\nmake -C utils distprep generated-header-symlinks\nprereqdir=`cd 'parser\/' &gt;\/dev\/null &amp;&amp; pwd` &amp;&amp; \\\n  cd '..\/..\/src\/include\/parser\/' &amp;&amp; rm -f gram.h &amp;&amp; \\\n  ln -s &quot;$prereqdir\/gram.h&quot; .\nprereqdir=`cd 'storage\/lmgr\/' &gt;\/dev\/null &amp;&amp; pwd` &amp;&amp; \\\n  cd '..\/..\/src\/include\/storage\/' &amp;&amp; rm -f lwlocknames.h &amp;&amp; \\\n  ln -s &quot;$prereqdir\/lwlocknames.h&quot; .\nmake&#x5B;2]: Entering directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/src\/backend\/utils'\nmake&#x5B;2]: Nothing to be done for 'distprep'.\n...\n...\n...\ngcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -fPIC -shared -o pgcrypto.so openssl.o pgp-mpi-openssl.o crypt-blowfish.o crypt-des.o crypt-gensalt.o crypt-md5.o mbuf.o pgcrypto.o pgp-armor.o pgp-cfb.o pgp-compress.o pgp-decrypt.o pgp-encrypt.o pgp-info.o pgp-mpi.o pgp-pgsql.o pgp-pubdec.o pgp-pubenc.o pgp-pubkey.o pgp-s2k.o pgp.o px-crypt.o px-hmac.o px.o  -L..\/..\/src\/port -L..\/..\/src\/common   -L\/usr\/lib64  -Wl,--as-needed -Wl,-rpath,'\/u01\/app\/postgres\/pgproduct\/pg-13.0\/lib',--enable-new-dtags   -lcrypto -lz\nmake&#x5B;2]: Leaving directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/contrib\/pgcrypto'\nmake&#x5B;1]: Leaving directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/contrib'\nPostgreSQL, contrib, and documentation successfully made. Ready to install.\n&#x5B;postgres@ocm199 postgresql-13.0]$\n<\/pre>\n<p>It is very important to for the following last sentense. In case you don&#8217;t see it, stop here, and check for any errors in the log files.<\/p>\n<p>-&gt; check for &#8220;PostgreSQL, contrib, and documentation successfully made. Ready to install.&#8221;<\/p>\n<p>Last but not least we run the make install-world command.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;postgres@ocm199 postgresql-13.0]$ make install-world | tee -a ~\/tmp\/PG_13.0\/PG13.0.make.install-world.log.${Date}\nmake -C .\/src\/backend generated-headers\nmake&#x5B;1]: Entering directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/src\/backend'\nmake -C catalog distprep generated-header-symlinks\nmake&#x5B;2]: Entering directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/src\/backend\/catalog'\nmake&#x5B;2]: Nothing to be done for 'distprep'.\nmake&#x5B;2]: Nothing to be done for 'generated-header-symlinks'.\nmake&#x5B;2]: Leaving directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/src\/backend\/catalog'\nmake -C utils distprep generated-header-symlinks\nmake&#x5B;2]: Entering directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/src\/backend\/utils'\nmake&#x5B;2]: Nothing to be done for 'distprep'.\nmake&#x5B;2]: Nothing to be done for 'generated-header-symlinks'.\nmake&#x5B;2]: Leaving directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/src\/backend\/utils'\nmake&#x5B;1]: Leaving directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/src\/backend'\nmake -C doc install\nmake&#x5B;1]: Entering directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/doc'\nmake -C src install\nmake&#x5B;2]: Entering directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/doc\/src'\nmake -C sgml install\nmake&#x5B;3]: Entering directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/doc\/src\/sgml'\n\/usr\/bin\/mkdir -p '\/u01\/app\/postgres\/pgproduct\/pg-13.0\/share\/doc\/'\/html '\/u01\/app\/postgres\/pgproduct\/pg-13.0\/share\/man'\/man1 '\/u01\/app\/postgres\/pgproduct\/pg-13.0\/share\/man'\/man3 '\/u01\/app\/postgres\/pgproduct\/pg-13.0\/share\/man'\/man7\ncp -R `for f in .\/html; do test -r $f &amp;&amp; echo $f &amp;&amp; break; done` '\/u01\/app\/postgres\/pgproduct\/pg-13.0\/share\/doc\/'\ncp -R `for f in .\/man1; do test -r $f &amp;&amp; echo $f &amp;&amp; break; done` `for f in .\/man3; do test -r $f &amp;&amp; echo $f &amp;&amp; break; done` `for f in .\/man7; do test -r $f &amp;&amp; echo $f &amp;&amp; break; done` '\/u01\/app\/postgres\/pgproduct\/pg-13.0\/share\/man'\nmake&#x5B;3]: Leaving directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/doc\/src\/sgml'\nmake&#x5B;2]: Leaving directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/doc\/src'\nmake&#x5B;1]: Leaving directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/doc'\nmake -C src install\nmake&#x5B;1]: Entering directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/src'\nmake -C common install\n...\n...\n...\n\/usr\/bin\/install -c -m 644 .\/ltree_plpythonu.control .\/ltree_plpython2u.control .\/ltree_plpython3u.control '\/u01\/app\/postgres\/pgproduct\/pg-13.0\/share\/extension\/'\n\/usr\/bin\/install -c -m 644 .\/ltree_plpythonu--1.0.sql .\/ltree_plpython2u--1.0.sql .\/ltree_plpython3u--1.0.sql  '\/u01\/app\/postgres\/pgproduct\/pg-13.0\/share\/extension\/'\n\/usr\/bin\/mkdir -p '\/u01\/app\/postgres\/pgproduct\/pg-13.0\/lib\/bitcode\/ltree_plpython3'\n\/usr\/bin\/mkdir -p '\/u01\/app\/postgres\/pgproduct\/pg-13.0\/lib\/bitcode'\/ltree_plpython3\/\n\/usr\/bin\/install -c -m 644 ltree_plpython.bc '\/u01\/app\/postgres\/pgproduct\/pg-13.0\/lib\/bitcode'\/ltree_plpython3\/.\/\ncd '\/u01\/app\/postgres\/pgproduct\/pg-13.0\/lib\/bitcode' &amp;&amp; \/usr\/bin\/llvm-lto -thinlto -thinlto-action=thinlink -o ltree_plpython3.index.bc ltree_plpython3\/ltree_plpython.bc\nmake&#x5B;2]: Leaving directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/contrib\/ltree_plpython'\nmake&#x5B;1]: Leaving directory '\/u01\/app\/postgres\/pgproduct\/stage\/13\/13.0\/postgresql-13.0\/contrib'\nPostgreSQL, contrib, and documentation installation complete.\n&#x5B;postgres@ocm199 postgresql-13.0]$\n<\/pre>\n<p>Again, the last sentense should be the following. If it is not the case, check your config and make log files.<\/p>\n<p>&#8212; check for &#8220;PostgreSQL, contrib, and documentation installation complete.&#8221;<\/p>\n<p>If everything went fine, you should end up with a pg-13.0 directory at a size of 72MB and a postgres binary of approximately 8MB.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;postgres@ocm199 pgproduct]$ du -hs pg-13.0\/\n72M   pg-13.0\/\n&#x5B;postgres@ocm199 pgproduct]$\n&#x5B;postgres@ocm199 pgproduct]$ cd pg-13.0\/bin\/\n&#x5B;postgres@ocm199 bin]$ ls -l postgres\n-rwxr-xr-x. 1 postgres postgres 8326120 Oct 26 08:50 postgres\n<\/pre>\n<p>Now you are ready to go to fire up your first PostgreSQL instance. \ud83d\ude42<\/p>\n<p>Conclusion<\/p>\n<p>Compiling PostgreSQL yourself is not too complicated, and it gives you a lot of advantages e.g. the ability to do multi-homing.<\/p>\n<p>Cheers<br \/>\nWilliam<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are many reasons why you want to compile PostgreSQL yourself. E.g. customized block size, customized set of features, however, the most important one for me is the ability to do multi-homing. By multi-homing I mean, that you can run as many different PostgreSQL versions as you wish. e.g. ..\/pgproduct\/pg-13.0 ..\/pgproduct\/pg-12.4 ..\/pgproduct\/pg-12.3 ..\/pgproduct\/pg-11.6 and so [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"off","ocean_gallery_id":[],"footnotes":""},"categories":[10,6],"tags":[21],"class_list":["post-36","post","type-post","status-publish","format-standard","hentry","category-centos-os","category-postgresql","tag-postgresql","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How To Compile PostgreSQL 13 on CentOS 8.2 - ptdb - Platinum DB<\/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:\/\/ptdb.ch\/?p=36\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How To Compile PostgreSQL 13 on CentOS 8.2 - ptdb - Platinum DB\" \/>\n<meta property=\"og:description\" content=\"There are many reasons why you want to compile PostgreSQL yourself. E.g. customized block size, customized set of features, however, the most important one for me is the ability to do multi-homing. By multi-homing I mean, that you can run as many different PostgreSQL versions as you wish. e.g. ..\/pgproduct\/pg-13.0 ..\/pgproduct\/pg-12.4 ..\/pgproduct\/pg-12.3 ..\/pgproduct\/pg-11.6 and so [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ptdb.ch\/?p=36\" \/>\n<meta property=\"og:site_name\" content=\"ptdb - Platinum DB\" \/>\n<meta property=\"article:published_time\" content=\"2020-10-26T14:00:55+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ptdb.ch\/?p=36\",\"url\":\"https:\/\/ptdb.ch\/?p=36\",\"name\":\"How To Compile PostgreSQL 13 on CentOS 8.2 - ptdb - Platinum DB\",\"isPartOf\":{\"@id\":\"https:\/\/ptdb.ch\/#website\"},\"datePublished\":\"2020-10-26T14:00:55+00:00\",\"author\":{\"@id\":\"https:\/\/ptdb.ch\/#\/schema\/person\/0b7baf52d23e71d85e1c95442306090b\"},\"breadcrumb\":{\"@id\":\"https:\/\/ptdb.ch\/?p=36#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ptdb.ch\/?p=36\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ptdb.ch\/?p=36#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ptdb.ch\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How To Compile PostgreSQL 13 on CentOS 8.2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ptdb.ch\/#website\",\"url\":\"https:\/\/ptdb.ch\/\",\"name\":\"ptdb - Platinum DB\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ptdb.ch\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/ptdb.ch\/#\/schema\/person\/0b7baf52d23e71d85e1c95442306090b\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ptdb.ch\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1a3dffc48c5f6bae0b88a9f0b2a986d48d322673fbc2880c5abbfab96e45da8a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1a3dffc48c5f6bae0b88a9f0b2a986d48d322673fbc2880c5abbfab96e45da8a?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\/\/ptdb.ch\"],\"url\":\"https:\/\/ptdb.ch\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How To Compile PostgreSQL 13 on CentOS 8.2 - ptdb - Platinum DB","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:\/\/ptdb.ch\/?p=36","og_locale":"en_US","og_type":"article","og_title":"How To Compile PostgreSQL 13 on CentOS 8.2 - ptdb - Platinum DB","og_description":"There are many reasons why you want to compile PostgreSQL yourself. E.g. customized block size, customized set of features, however, the most important one for me is the ability to do multi-homing. By multi-homing I mean, that you can run as many different PostgreSQL versions as you wish. e.g. ..\/pgproduct\/pg-13.0 ..\/pgproduct\/pg-12.4 ..\/pgproduct\/pg-12.3 ..\/pgproduct\/pg-11.6 and so [&hellip;]","og_url":"https:\/\/ptdb.ch\/?p=36","og_site_name":"ptdb - Platinum DB","article_published_time":"2020-10-26T14:00:55+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/ptdb.ch\/?p=36","url":"https:\/\/ptdb.ch\/?p=36","name":"How To Compile PostgreSQL 13 on CentOS 8.2 - ptdb - Platinum DB","isPartOf":{"@id":"https:\/\/ptdb.ch\/#website"},"datePublished":"2020-10-26T14:00:55+00:00","author":{"@id":"https:\/\/ptdb.ch\/#\/schema\/person\/0b7baf52d23e71d85e1c95442306090b"},"breadcrumb":{"@id":"https:\/\/ptdb.ch\/?p=36#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ptdb.ch\/?p=36"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/ptdb.ch\/?p=36#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ptdb.ch\/"},{"@type":"ListItem","position":2,"name":"How To Compile PostgreSQL 13 on CentOS 8.2"}]},{"@type":"WebSite","@id":"https:\/\/ptdb.ch\/#website","url":"https:\/\/ptdb.ch\/","name":"ptdb - Platinum DB","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ptdb.ch\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ptdb.ch\/#\/schema\/person\/0b7baf52d23e71d85e1c95442306090b","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ptdb.ch\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1a3dffc48c5f6bae0b88a9f0b2a986d48d322673fbc2880c5abbfab96e45da8a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1a3dffc48c5f6bae0b88a9f0b2a986d48d322673fbc2880c5abbfab96e45da8a?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/ptdb.ch"],"url":"https:\/\/ptdb.ch\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ptdb.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=36"}],"version-history":[{"count":0,"href":"https:\/\/ptdb.ch\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions"}],"wp:attachment":[{"href":"https:\/\/ptdb.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ptdb.ch\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ptdb.ch\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}