sql

All things SQL and JDBC...
orestis 2020-01-27T04:48:14.002500Z

Any experiences with Postgres on AWS RDS? Good/bad/horror/managed alternatives?

Cora (she/her) 2020-01-27T05:29:23.002800Z

it's great

Cora (she/her) 2020-01-27T05:29:43.003400Z

pay attention to how they do restarts for maintenance though

Cora (she/her) 2020-01-27T05:30:16.004500Z

and the reviews on aurora are mixed. I've heard absolute nightmare stories from others but we've found it to be ok

orestis 2020-01-27T05:33:18.006200Z

Aurora doesn’t seem to support in place major upgrades which seems off. I’d probably start with plain multi-az rds and see how it feels like...

orestis 2020-01-27T05:34:32.007800Z

We don’t have a DBA on the team so my main fear with Postgres is that we’ll mess up :)

Cora (she/her) 2020-01-27T06:04:12.008200Z

scripting your own postgres upgrades sucks a lot

Cora (she/her) 2020-01-27T06:04:44.008900Z

and amazon periodically forcing upgrades actually helps a lot with making organizations take maintenance windows for upgrading it

dharrigan 2020-01-27T07:29:21.009500Z

We use PostgreSQL on RDS a lot. Never had any issues.

dharrigan 2020-01-27T07:30:19.010500Z

Yes, keep an eye on maintanence windows, and plan for it. We have multi-region A-Z setups

dharrigan 2020-01-27T07:30:36.010800Z

PostgreSQL is my favourite relational DB 🙂

orestis 2020-01-27T07:42:04.012300Z

Are you using read replicas of any sorts? I was surprised to see that the multi-az setup, the second instance is only on standby and can’t serve traffic.

orestis 2020-01-27T07:42:36.013300Z

So it seems that the only possible scaling is via read replicas with some lag, or scaling up for bigger machines.

orestis 2020-01-27T07:43:04.014200Z

Not really concerned for my needs, just checking to see if I have an accurate picture...

dharrigan 2020-01-27T07:43:37.014600Z

no read replicas, we dont' have that use-case (mostly it's very heavy writing)

dharrigan 2020-01-27T07:44:12.015200Z

I consume millions of events per day and the CPU on the instance never goes about 4-5%

orestis 2020-01-27T08:03:58.016100Z

Oh wow, what kind of instance are you running?

dharrigan 2020-01-27T08:40:43.016300Z

db.r4.2xlarge

orestis 2020-01-27T09:02:46.017200Z

Cool - may I also ask what your tech stack is? JVM/JDBC etc?

dharrigan 2020-01-27T09:06:06.017400Z

We have many. But for what I'm doing, it's JVM based (running Clojure!)

dharrigan 2020-01-27T09:06:11.017600Z

Mostly we are JVM based

dharrigan 2020-01-27T09:06:28.017800Z

I'm using next jdbc and honeysql

dharrigan 2020-01-27T09:06:39.018Z

oh, I also do a lot of Postgis (geospatial) work

dharrigan 2020-01-27T07:44:14.015400Z

🙂

dharrigan 2020-01-27T07:44:24.015700Z

bbl

2020-01-27T16:42:18.019Z

We use Postgres on RDS heavily too. Smooth experience.

kulminaator 2020-01-27T20:35:57.020600Z

running around dozen postgres instances (often with read replicas or even many) on rds in production. i'm really happy i don't have to manage those machines by hand, can spend my time elsewhere.

kulminaator 2020-01-27T20:36:32.021400Z

for only very big postgres instances we run separate boxes, there it becomes financially reasonable to host your own

kulminaator 2020-01-27T20:40:12.022800Z

from the default settings of read replicas - you probably want to increase the time interval that the replicas allow queries to run, the default is something super low , like 30 or 60 seconds. if you use a read replica as a reporting database you probably will have queries that run for several minutes.