Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PostgreSQL for Data Architects

You're reading from   PostgreSQL for Data Architects Discover how to design, develop, and maintain your database application effectively with PostgreSQL

Arrow left icon
Product type Paperback
Published in Mar 2015
Publisher
ISBN-13 9781783288601
Length 272 pages
Edition 1st Edition
Arrow right icon
Author (1):
Arrow left icon
Jayadevan M Jayadevan M
Author Profile Icon Jayadevan M
Jayadevan M
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Installing PostgreSQL FREE CHAPTER 2. Server Architecture 3. PostgreSQL – Object Hierarchy and Roles 4. Working with Transactions 5. Data Modeling with SQL Power Architect 6. Client Tools 7. SQL Tuning 8. Server Tuning 9. Tools to Move Data in and out of PostgreSQL 10. Scaling, Replication, and Backup and Recovery 11. PostgreSQL – Troubleshooting 12. PostgreSQL – Extras Index

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 and readline).

    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:

Configuring and creating the makefile

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:

Configuring and creating the makefile

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.

You have been reading a chapter from
PostgreSQL for Data Architects
Published in: Mar 2015
Publisher:
ISBN-13: 9781783288601
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime