|
|
The load balancer is premised on the Cluster DB working, and the Cluster DB
is premised on the replication server working. Please perform starting of each
server in order of a replication server -> Cluster DB -> load balancer.
Start and a stop of replication server
|
(1) Start replication server
|
$ /usr/local/pgsql/bin/pgreplicate -D /usr/local/pgsql/etc |
(2) Stop replication server
| $ /usr/local/pgsql/bin/pgreplicate -D /usr/local/pgsql/etc
stop |
(3) Usage of a replication server's operation command .
A replication server's operation command is 'pgreplicate'.
Usage : pgreplicate [-D path of a configuration file] [-W path of a log
file][-v] [-n] [-l][-h] [stop]
Options' meaning is as follows.
| -D |
Specification of the path of a configuration file. (default is "./") |
| -W |
Specification of the path of a log file. (default is "./") |
| -n |
Replication server is started without demonizing. |
| -v |
Replication server is started by a debug mode. In a debug mode, a lot of
strings for debugging are displayed.This option needs to use together with
-n option. |
| -l |
Replication server prints error logs in the log file. |
| -h |
Replication server prints help information and stops. |
| stop: |
This option stops the replication server. |
Start and a stop of Cluster DB
|
(1)Starting of Cluster DB
Starting of Cluster DB is the same as starting of 'postmster' of PostgreSQL.
| $ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data -o "-i"
start |
Please refer to the manual
of PostgreSQL about the starting option of PostgreSQL.
(2)Stop of Cluster DB
Please specify the stop option as the stop of Cluster DB.
|
$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data stop |
Start and a stop of load balancer
|
(1) Start load balance server
|
$ /usr/local/pgsql/bin/pglb -D /usr/local/pgsql/etc |
(2) Stop of a load balancer
|
$ /usr/local/pgsql/bin/pglb -D /usr/local/pgsql/etc stop |
(3) Usage of a load balancer's operation command .
A load balancerr's operation command is 'pglb'.
Usage : pglb [-D path of a configuration file] [-W path of log file][-v]
[-n] [-l][-h] [stop]
Options' meaning is as follows.
| -D |
Specification of the path of a configuration file. (default is "./") |
| -W |
Specification of the path of a log file. (default is "./") |
| -n |
Replication server is started without demonizing. |
| -v |
Replication server is started by a debug mode. In a debug mode, a lot of
strings for debugging are displayed.This option needs to use together with
-n option. |
| -l |
Replication server prints error logs in the log file. |
| -h |
Replication server prints help information and stops. |
| stop: |
This option stops the replication server. |
Creation of a new database, and data transition from the existing database
|
You can create a new database by the 'createdb' command. You can import data
by the COPY command or the psql command to take in the data of the existing database.
These are the same as PostgreSQL. When you execute these commands in a Cluster
DB, these commands will be executed in all Cluster DBs automatically by a synchronous
replication.
|