Book Image

PostgreSQL Cookbook

By : Chitij Chauhan
Book Image

PostgreSQL Cookbook

By: Chitij Chauhan

Overview of this book

<p>PostgreSQL is an open source database management system. It is used for a wide variety of development practices such as software and web design, as well as for handling large datasets (big data).</p> <p>With the goal of teaching you the skills to master PostgreSQL, the book begins by giving you a glimpse of the unique features of PostgreSQL and how to utilize them to solve real-world problems. With the aid of practical examples, the book will then show you how to create and manage databases. You will learn how to secure PostgreSQL, perform administration and maintenance tasks, implement high availability features, and provide replication. The book will conclude by teaching you how to migrate information from other databases to PostgreSQL.</p>
Table of Contents (19 chapters)
PostgreSQL Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Testing remote connectivity


After configuring the network environment in PostgreSQL, it is usually a good idea to test it out.

How to do it...

You can use the psql program to test connections to the PostgreSQL server from a remote client:

D:\Postgresql_Project\bin>psql -h 192.168.12.10 hrdb agovil
Password for user agovil:
psql (9.3.4)
WARNING: Console code page (437) differs from Windows code page (1252)
         8-bit characters might not work correctly. See psql reference
         page "Notes for Windows users" for details.
Type "help" for help.

Hrdb=>

How it works...

After enabling client authentication between the PostgreSQL server and the client application, as well as after configuring access control rules in the host's pg_hba.conf configuration file, it is a good idea to test for remote connectivity.

This will help you to find out whether the access control rules are configured correctly in the pg_hba.conf file and whether the clients face any connection errors despite being allowed...