---
title: PostgreSQL
tags: Database
image:
---
# PostgreSQL
## Sync Replication
### Asynchronous Replication
PostgreSQL asynchronous replication is a methodology in which it is possible to create read-only replicas of primary or master servers so that these might be used in an emergency situation or achieve the benefits/objectives mentioned above.
### Synchronous Replication
As the name suggests, that data is replicated to the secondary servers at the same time as it is written on the primary servers. The main idea of PostgreSQL synchronous replication lies in the fact that changes must be on at least a couple of servers before the primary returns a positive response or success to the secondary or a slave node.
## References
* [官網](https://www.postgresql.org/)
* [Feature Matrix](https://www.postgresql.org/about/featurematrix/)
* [Highly Available PostgreSQL Cluster using Patroni and HAProxy](https://jfrog.com/community/devops/highly-available-postgresql-cluster-using-patroni-and-haproxy/)
* [How to migrate data PG data to Cassandra #8496](https://github.com/thingsboard/thingsboard/issues/8496)