9.3.2
Table Of Contents
- Using VMware vFabric Postgres
- Contents
- Preface
- VMware Customizations for PostgreSQL
- Installing vFabric Postgres
- vFabric Postgres Client Tools and Libraries
- Managing vFabric Postgres
- Migrate PostgreSQL Data from Earlier Versions Into vFabric Postgres 9.3
- Migrate PostgreSQL Data Into vFabric Postgres
- Restarting the vFabric Postgres Service
- Connection to a vFabric Postgres Database
- Accounts and Services
- Safeguarding Data
- About vFabric Postgres Replication
- Create a Replication User Account
- Create a Replica Server
- Promote a Replica Database to Primary Database
- Monitoring Replication Status
- Using Perl and Python Language Extensions
- Viewing Performance Statistics
- Troubleshooting Guidelines
- Using the Graphical User Interface
- Index
n
If a slave is disconnected for an extended period of time from the cluster, and it cannot get the
necessary WAL files from the archives of the master, you must create a new base backup. This helps
maintain the archives at a low size level (a size you can customize by changing the disk size of archives
in the virtual machine settings) by keeping in memory only the WAL files needed by slaves to catch up
with a master.
n
Recovery default is the latest time-line. This ensures that a slave trying to reconnect to a newly
promoted node will catch up with the latest changes that have occurred in the cluster.
n
Using cascading replication slave-to-slave connections are possible.
You will find the scripts in the directory /opt/vmware/vpostgres/current/scripts.
run_as_replica
Transforms an existing vFabric Postgres server into a slave by synchronizing
it with a given root node (either slave or master), or reconnecting to an
existing node in the cluster.
show_replication_statu
s
Monitors Write-Ahead Logging (WAL) replay activity of slave nodes
connected to the master node. WAL is a standard approach to transaction
logging in which changes to data files are written to only after those changes
have been logged. WAL allows for a significant reduction in the number of
disk writes because only the log file needs to be flushed to disk at the time of
transaction committal, rather than every data file changed by the transaction.
Using WAL to replicate data is the fastest type of replication available,
allowing you to quickly create slave instances of vFabric Postgres databases.
promote_replica_to_pri
mary
Promotes a given slave to master using the default settings in the recovery
configuration (recovery.conf) file.
NOTE Other slave nodes can reconnect to a new master using the
run_as_replica script.
archive_command
Archives WAL files (specified with the archive_command in the
postgresql.conf file, started by the vFabric Postgres server each time a
WAL file is ready to be archived, or archive_timeout is reached). This script
checks for the existence of a WAL file to be archived, and verifies the size of
the archive disk to ensure that only required WAL files are maintained based
on the disk space available for archives. WAL files are archived if the root
node is part of a cluster as either a primary or replica server.
create_replication_user
Creates a new replication user on a master node. It generates a CREATE
USER query using a password that it prompts you for when you run the
script.
Create a Replication User Account
You can create a database user account expressly for the purpose of replicating and promoting replica
nodes.
The preferred practice when creating replica server nodes and promoting them, is to log in with a user
account expressly designed for replication.
Procedure
1 Log in to the master database server.
Using VMware vFabric Postgres
32 VMware, Inc.