Database Reference
In-Depth Information
When we start a database server, we refer to one data directory, which contains the heart
and soul, or at least the data for our database. Subsidiary tablespaces may contain some data
outside of the main data directory, so the data directory is just the main central location, and not
the only place where data for that database server is held. Each running server has one data
directory, and one data directory can have at the most one running server (or "instance").
To perform any action for a database server, we must know the data directory for that server.
The basic actions we can perform on the database server are starting and stopping. We
can also perform a restart, though that is just a stop, followed by a start. In addition, we can
reload the server, meaning to reread the server's configuration files.
We should also mention a few other points:
The default port number for PostgreSQL is 5432. That has been registered with Internet
Assigned Numbers Authority (IANA), and so should already be reserved for PostgreSQL's use
in most places. Because each PostgreSQL server requires a distinct port number, the normal
convention is to use subsequent numbers for any additional server, for example, 5433,
5434, and so on. Subsequent port numbers might not be as easily recognized by the network
infrastructure, which might in some cases make life more difficult for you in larger enterprises,
especially more security-conscious ones.
The database server is also sometimes referred to as a database cluster. I don't recommend
the term for normal usage because it makes people think about multiple nodes, not just one
database server on one system.
Starting the database server manually
Typically, the PostgreSQL server will start automatically when the system boots. You may
have opted to stop and start the server manually, or you may need to start up/shut down
for various operational reasons.
Getting ready
First, we need to understand the difference between the service and the server. The word
server refers to the database server and its processes. The word service refers to the
operating system wrapper by which the server gets called. The server works in essentially the
same way on every platform, whereas each operating system and distribution has its own
concept of a service.
How to do it...
On all platforms, there is a specific command to start the server, which is as follows:
 
Search WWH ::




Custom Search