- PostgreSQL for Data Architects
- Jayadevan Maymala
- 481字
- 2021-07-23 19:41:22
Configuring and creating the makefile
The next step is to execute configure
. This is a shell script which will run, to quote documentation, a number of tests to determine several system dependent variables. It will also create many files that will be used during compilation. We can get an idea about the options by executing the following command:
./configure --help > /tmp/config.txt
We can vi /tmp/config.txt
and verify that there are over 80 options that can be used. These options can be broadly grouped into the following categories:
- Related to choosing directories. If architecture-independent files go to
/usr/local/pgsql
or elsewhere, where should the binaries go, where should the documentation files go, and so on. - Related to debugging, profiling, tracing, and so on to be used with care in production.
- Related to choosing nondefault settings for parameters such as blocksize, port, and segment size. Changing default setting for parameters such as blocksize can have significant impact on performance. So, we need to be cautious here. Changing the default port is a good idea from a security perspective. It can be changed later in the configuration file also.
- Related to enabling options, such as OpenSSL support, SELinux support, and LDAP support.
- Related to building modules for several languages (Perl, Python, and PL/TcL).
- Related to disabling a few features (such as
zlib
andreadline
).Tip
Pay attention to the
--prefix
option. If you would like to do a clean upgrade without causing disruption to the existing environment, provide a directory in which the installation files should be written to. This way, each version will be in a different directory. For example:./configure --prefix=/opt/pg/9.3
When we run ./configure
, it's likely that we get an output like this:

The output tells us that readline
is not available. However, if we list installation packages, it is very much there. The reason is that readline-devel
is missing. It contains files needed by programs (such as psql
) that use the readline
library. This can be installed using the following command:
yum install readline-devel.x86_64
It also installs ncurses-devel
. You will have to execute the command using sudo
or root
. You might also get a similar error for zlib
, although zlib
itself is already installed. Again, the corrective action is to install devel
, in this case, zlib-devel
.
Once this is done, we can run configure
again and it should go through without any issues, as shown in the following screenshot:

The two files are now created in the current directory in addition to a few more files in subdirectories. One is config.status
and the other (config.log. config.status
) is a bash script that can be executed to recreate the configuration. The config.log
file can be reviewed to understand the various options used, variables, and errors, if any. It's possible that the config.log
file has a few errors that are marked fatal, and the compilation process can still be completed without any issue.
- Go語言高效編程:原理、可觀測(cè)性與優(yōu)化
- Java加密與解密的藝術(shù)(第2版)
- SQL for Data Analytics
- 高級(jí)C/C++編譯技術(shù)(典藏版)
- 零基礎(chǔ)學(xué)Python數(shù)據(jù)分析(升級(jí)版)
- 精通MySQL 8(視頻教學(xué)版)
- ASP.NET Web API Security Essentials
- Learning Bootstrap 4(Second Edition)
- Python 快速入門(第3版)
- R語言:邁向大數(shù)據(jù)之路
- KnockoutJS Blueprints
- Appcelerator Titanium Smartphone App Development Cookbook
- Access 2016數(shù)據(jù)庫應(yīng)用與開發(fā):實(shí)戰(zhàn)從入門到精通(視頻教學(xué)版)
- Web程序設(shè)計(jì)與架構(gòu)
- Expert Angular