Академический Документы
Профессиональный Документы
Культура Документы
Status: active
To Action From
-- ------ ----
Status: active
To Action From
-- ------ ----
Status: active
To Action From
-- ------ ----
22 ALLOW Anywhere
Hostname AssignmentPermalink
127.0.0.1 localhost
127.0.0.1 localhost
127.0.0.1 localhost
Install PostgreSQLPermalink
PostgreSQL version 9.6 offers significant improvements for database replication, but
unfortunately, it is not included in the default Ubuntu 16.04 repositories. Install the newest
version on all database nodes.
Add the official PostgreSQL-Xenial repository to your system:
Begin with the PostgreSQL user needed for Odoo communications. Create this user on both
Master and Slave nodes. Switch to the postgres user and create the database user odoo in
charge of all operations. Use a strong password and save it in a secure location, you will need it
later:
Use the same password for the Odoo postgres user on all nodes. Odoo is not aware of database
replication, so it will be easier to trigger an eventual failover procedure if both servers share the
same information.
The replicauser user has fewer privileges than the odoo user because the replicauser’s only
purpose is to allow the Slave to read information from the Master nodes. The --replication
option grants the required privilege that replicauser need to perform its job.
# Tambahan entry
/etc/postgresql/9.6/main/pg_hba.conf
# Tambahan entry
# Tambahan entry
Each line provides the client authentication permissions to connect to a specific database. For
example, the first line allows the Slave to connect to the Master node using replicauser, and the
second line grants the odoo user the rights connect to all databases within this server.
Add a similar configuration to the Slave node, this will make it easier to promote it to master
status if necessary:
/etc/postgresql/9.6/main/pg_hba.conf
replication: Specifies a replication connection for the given user. No database name is required
for this type of connection.
all: Match all databases in the server. You could provide specific Odoo database names
(separated by commas if more than one) if you know them beforehand.