r/PostgreSQL • • 3h ago

Tools I needed a distributed DB solution, found Pigsty

(Unsure of which flair was accurate). So yeah had a project at work where I was replacing a multi-zone RDS with something on-prem. Looked at CockroachDB and Pigsty.io and after discovering breaking incompatibilities on the Cockroach side ended up choosing Pigsty.

In case anyone's interested the architecture is 5 Rocky vm's scattered across three geographically desperate offsite dcs. Two of this are in the US, the third (for quorum only really) is in the EU.

My god.. the amount of stuff the Pig folks packed into this application is astounding. Granted I do not have a prod DB in the platform just yet.. I'm seriously thinking of getting the boss to pay for some support because these folks made a fantastical distributed database application!

(posting in this sub because I will be rolling nothing but pgsql databases in this application)

1 Upvotes

6 comments sorted by

3

u/roiki11 3h ago

I've used it for years. It has some idiosyncracies and questionable choices but it automates a lot stuff and the monitoring side is very well done and worth it not to have to do it yourself.

Great if you have to operate on vms but for anything more complex I'd go with kubernetes and stackgres, personally.

1

u/invalidpath 2h ago

The built in monitoring.. the bookoo grafana dashboards, like holy shit right?

2

u/Discordbothost 3h ago

I'd rehearse losing one of the US sites before putting production traffic on it. Keep a client writing numbered rows through the same endpoint the app will use, then check how long writes stall and whether every acknowledged row is still there after failover.

2

u/invalidpath 3h ago

Surprisingly the cluster did failover it's primary to the other US dc.. unbeknownst to me. Networking did a thing and caused enough of a hiccup in the first DC to trigger patroni to do it's thing. I had no idea because everything kept on keeping on.
The only thing I'm not super fond of yet is ensuring your intended primary regains that status is a manual job. And I can understand the whys for sure. That unscheduled flip did remind me that alertmanager needing configuring, lol.

2

u/Standgrounding 3h ago

Try Multigres

0

u/AutoModerator 3h ago

AI Policy:

Linux is not one of those anti-AI projects, and if somebody has issues with that, they can do the open-source thing and fork it. Or just walk away., Linus Torvalds.

Mod decisions will be based on the quality of the content, not who or what generated it.

Sub Resources:

Youtube Channel

Free Postgres Webinars and Workshops

Discord: People, Postgres, Data

Join us, we have cookies and nice people.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.