Is there a way we can setup multinode cluster in Postgres like Oracle RAC:
Oracle RAC allows multiple computers to run Oracle RDBMS software simultaneously while accessing a single database, thus providing clustering.
So far I went through several articles but it seems Postgres does not support it.
PGPool is the only way we can do load balancing but it won't be same as RAC.
Related
I'm trying to setup a "Serverless" PostgreSQL data replication architecture.
Here's what I'm trying to do:
I'm trying to install a PostgreSQL database in every machine and then have that data synchronize between all available servers.
I've tried SymmetricDS but it does not allow me to do a mesh type network.
I'm currently trying EDB Replication Server, but I need to have a centralized point to install the server. If it were possible to install the server on every machine and then have it sync between each other would be great, but it doesn't seem possible.
Any tips on how to achieve Multi-master "serverless" architecture in postgresql? Any success stories and tips would be appreciated.
We have a cluster on Postgres 12 installed locally (CentOS) and another RDS. We want to synchronize two tables, one from on-premise against another from the cloud (RDS), but we need it to be in both directions, that is, local-> RDS and RDS -> local.
The idea is to be able to attack (insert/update/delete) indistinctly from the applications to one or another cluster.
Can ankane/pgsync be used to update tables bi-directionally, or is it one-way parent/child mode?
Is this possible with pgsync (ankane) or is there another tool?
I have ECS at Alibaba cloud, I want to add PostgreSQL, but I can't find any Tutorials on the Internet
how to add PostgreSQL to ECS Alibaba Cloud
There are several ways on using PostgreSQL on Alibaba Cloud:
ApsaraDB RDS for PostgreSQL, which is PaaS solution for PostgreSQL on Alibaba Cloud, so you don't have to worry about installing and configuring PostgreSQL from scratch. It comes with a lot of additional features such as, high availability, disaster recovery, backup, etc. You can find their documentation on creating your PostgreSQL instance.
ApsaraDB for PolarDB, also a PaaS, which is Alibaba Cloud's homegrown RDB fully compatible with MySQL and PostgreSQL. It can support higher storage capacity, nodes clustering, and it's designed for high performance. Check out their documentation on how to create a PostgreSQL cluster.
Self-managed PostgreSQL on ECS - of cause you can still run PostgreSQL on your own ECS. There're plenty of resources on how to install and configure your own PostgreSQL. Check out the DigitalOcean's tutorial on installing PostgreSQL on Ubuntu 20.04.
You have two ways to do it.
you would just take the ECS as a Linux server. you build the PostgreSQL by yourself. it may request higher skills.
you would use the PaaS service, polardb(PostgreSQL) ,you do not need build it step by step ,just use it in 2-3 mins.
the polardb links as below:
https://www.alibabacloud.com/product/polardb?spm=a3c0i.20899616.6791778070.dbannerarelationaldb1.53fd2accf4slGC
I have a Aurora postgresql cluster in AWS and have one DB instance in this cluster. The postgresql DB is only used for write not for read. I use it as a backup database. I know Aurora has read scaling policy and I can create multiple DB instances in this cluster to improve read performance. But it doesn't benefit my case (write only). My question is that is there any benefits for me to spin up multiple db instances in the cluster. Aurura postgresql is a single master mode which means only one instance can take write. If I deploy multiple instances/replicas, they are basically useless. Do I understand it correctly?
Yes, you are correct. In your case there is no reason to launch additional instances in the cluster.
In the future, you may be able to use Aurora multi-master to give you more performance for writes. This is only available for MySQL 5.6 at the moment. See https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-multi-master.html
This will be confusing for some due to poor terminology choices by the PostgreSQL folks, but please bear with me...
We have a need to be able to support multiple PostgreSQL (PG) clusters, and cluster them on multiple servers using, e.g. repmgr. For example, to support both server availability and also PITR for each PG cluster. A single PG cluster per server is too expensive in many cases, so we multi-tenant (small) customers on separate PG clusters, for data separation, recovery, etc., but also want to be able to support HA via replication/fail-over.
The closest analogy for a PG cluster is a SQL Server instance - each can host multiple DB's, has its own port, etc. Like SQL Server, you can run multiple instances (PG clusters) on the same server, and set up replication for each.
Basic repmgr setup is no problem - that seems fairly clear in the single PG cluster model. But, is there any recommended/supported approach to multiple PG clusters using repmgr? I can kind of imagine faking repmgr into thinking each PG cluster is in effect a separate repmgr cluster (with separate repmgr.conf, connection info/port). But, I'm not yet sure that will work.
I'd typically expect to fail-over all PG clusters on the same server - not one at a time.
I recognize this may not be the best idea in all cases, but am mostly exploring what's possible. I have some alternatives, but this is closest to our current single-node model.
To clarify, I need to support many thousands of customers across many server clusters. Ideally, each cluster uses the same repmgr DB (in the main PG cluster, e.g.), and essentially stands alone from the other server clusters.
Thanks...
Answering my own question, but I hope someone eventually posts a better answer, as I otherwise quite like repmgr. In the end, it appears repmgr just isn't suitable for multiple PG clusters (instances), as there is an implied relationship between the repmgr cluster connection strings and the PG cluster (port). Thus, you'd essentially have to create a separate repmgr environment (DB) for every clustered PG cluster/instance, losing a lot of the operational simplicity that repmgr brings to the table.
I will investigate a more generic solution using Corosync/Pacemaker/etc., as at least in that case, the virtual cluster IP handling is built-in to the solution, and doesn't require additional software/resources to pull off.
I'm sure I'm probably over-simplifying things, but it seems like repmgr was tantilizingly close to solving much of the problem, had it allowed the repmgr DB to be fully independent of the PG cluster and allow each repmgr cluster to specify its own connection info, not (only) the connection info for the repmgr DB itself.