News for hackers. Stuff that matters.

tommyzli

Re:Ask HN: What are you working on (August 2024)? on Sunday August 25, 2024 @02:31AM (#41344935)
Just last week I started hacking on a k8s operator for managing postgres roles, grants and databases. I really like the continuous reconciliation for this scenario, especially having previously worked at places that managed this with shell scripts or terraform.
Re:Amazon Aurora Limitless Database on Tuesday November 28, 2023 @11:58AM (#38447896)
I'm curious to hear more about your troubles with alloydb. It's something I just started to test out at work
Re:Running Databases on Kubernetes on Thursday March 02, 2023 @05:59PM (#35003282)
the last time I gave the Postgres operator space a serious look was about a year ago, and at the time the Zalando operator was far and away the most feature complete and mature.

We had a couple unusual requirements that the operator wasn't really suited for, so we ultimately ended up writing our own helm chart and forgoing the operator route altogether

Re:Our Journey to PostgreSQL 12 on Wednesday January 27, 2021 @12:58PM (#25931447)
Wow, I wasn't expecting such an in-depth response!

It sounds like making user profiles a reference table would solve the cross-shard join problem, but what would the performance implications look like?

The docs just say that it does a 2PC, which I'm assuming won't perform very well in a high-write workload

Re:Postgres scaling advice on Tuesday January 26, 2021 @02:28PM (#25920067)
1. You'll have to define "slow" - I have a 3TB table where an index only scan takes under 1ms

2. hot_standby_feedback is absolutely safe. I've got 5 hot standbys in prod with that flag enabled

3. Again, it depends on how "heavy" your update throughput is. It is definitely tough to find the right balance to configure autovacuum between "so slow that it can't keep up" and "so fast that it eats up all your I/O"

Re:Our Journey to PostgreSQL 12 on Tuesday January 26, 2021 @02:36AM (#25913448)
Believe it or not these numbers are actually from _after_ me and some others spent a few weeks cleaning up our heavier queries
Re:Our Journey to PostgreSQL 12 on Tuesday January 26, 2021 @01:16AM (#25913110)
TIL, this is really good to know! Do you know offhand if this is a new feature, or have I just always been wrong
Re:Our Journey to PostgreSQL 12 on Monday January 25, 2021 @09:00PM (#25911554)
It's not in the post, but I answered this in a separate thread. RDS doesn't let us provision as many IOPS as we need.

Apparently Aurora behaves differently, but I wasn't aware of that when we specced out the project.

Re:Our Journey to PostgreSQL 12 on Monday January 25, 2021 @08:48PM (#25911455)
Nope.
Re:Our Journey to PostgreSQL 12 on Monday January 25, 2021 @08:42PM (#25911403)
We are living life on the edge to an extent, but we have 5 hot standbys across AZs and regular backups + WAL archives to S3.

May not be as durable as EBS, but it's enough for me to sleep soundly at night. And with a highly concurrent WAL-G download, it takes like an hour to catch up a new replica from scratch.

Re:Our Journey to PostgreSQL 12 on Monday January 25, 2021 @07:59PM (#25911123)
Apparently I'm living in the twilight zone because I have a vivid memory of reading the Aurora docs and seeing the same limit. Oh well, it's something to consider for the next upgrade.
Re:Our Journey to PostgreSQL 12 on Monday January 25, 2021 @07:53PM (#25911075)
basically what paulryanrogers said.

We thought about migrating to Citus, but I don't have a good idea of how to shard our dataset efficiently.

If we were to shard by user id, then creating a match between two people would require cross-shard transactions and joins. Sharding by geography is also tough because people move around pretty frequently.

Re:Our Journey to PostgreSQL 12 on Monday January 25, 2021 @07:41PM (#25910988)
ants_a is correct. Also, our NVMe storage is ephemeral so you aren't recovering from a power loss anyways :)
Re:Our Journey to PostgreSQL 12 on Monday January 25, 2021 @07:25PM (#25910841)
How would that have worked with multiple replicas cascading from the new primary? Streaming replication doesn't work across versions, so would we have had to build out a tree of new instances, then pg_upgrade them all at the same time?
Re:Our Journey to PostgreSQL 12 on Monday January 25, 2021 @06:52PM (#25910593)
Thanks! We stuck with plain EC2. RDS has a limit of 80,000 provisioned IOPS and our read replicas on Postgres 9.6 would regularly hit near double that during peak