hapostgres / pg_auto_failover

Postgres extension and service for automated failover and high-availability
Other
1.07k stars 112 forks source link

Create Second database with pg_auto_failover & citus #980

Closed developer-espark closed 1 year ago

developer-espark commented 1 year ago

I trying to implement citus cluster with 1 monitor, 2 coordinator (1 primary / 1 secondary), 4 workers (2 primary / 2 secondary). By default i have database setup ready with citus and pg_auto_failover.

But now i wanted to create 2nd database with citus worker enabled. I create new database called "test" on coordinator & worker and enabled citus on all. Now on coordinator, i need to add worker node. I tried to primary node using

SELECT * from citus_add_node('citus-worker2-a', 5432);

and secondary node using (stand by node)

select * from citus_add_inactive_node('citus-worker2-b', 5432);

Both above query run successfully. But when i perform failover using pg_autoctl on worker2 group, failover was done successfully but it didn't change any thing in "test" database active node.

image

After failover successfully performed, it should be citus-worker2-b.

There is no documentation available, how to create second database with pg_auto_failover & citus?

DimCitus commented 1 year ago

Hi @developer-espark ; at the moment Citus itself is limited to a single database in a Postgres cluster. That's why pg_auto_failover also only supports a single Citus database. That's a limitation of the product.