sql

All things SQL and JDBC...
dharrigan 2020-01-28T07:42:57.023600Z

@kulminaator have your instances had their autovacuum settings readjusted from the defaults?

kulminaator 2020-01-28T08:16:39.024400Z

Yes we have had adjustments on those too, depending on apps

kulminaator 2020-01-28T08:17:07.025300Z

On some we probably will go for additional automated vacuums from apps too.

dharrigan 2020-01-28T08:33:30.025800Z

Yeah, it's probably the most important thing to tune for PostgreSQL

orestis 2020-01-28T09:36:44.026700Z

So it’s not 100% worry-free, right? In the sense that I pay someone else to worry about tuning and tweaking and settings.

orestis 2020-01-28T09:37:57.028100Z

I’m not too opposed to have to learn a few things, and it seems AWS limits the parameters you can tweak which is probably a good idea. They also have “Performance Insights” now which might help for some use cases. But it seems like I’d need to have some support from a DBA every once in a while.

dharrigan 2020-01-28T09:57:22.029100Z

imho, if one is running any system, be it mysql, mariadb, postgresql, mongodb etc.., then having at least some understanding of how it works (where it works well, and where it does not) is still important, even with SaaS offerings

dharrigan 2020-01-28T09:57:50.029600Z

Everything needs tweaking to suit particular use cases 🙂

kulminaator 2020-01-28T11:31:46.031300Z

I dont think any storage is worry free, but it is easier than just postgres clusters on top of ubuntu and chef infra. That requires way more.

kulminaator 2020-01-28T11:32:18.032200Z

My team is pretty solid on db stuff, so i'm not too worried.

kulminaator 2020-01-28T11:33:47.034800Z

If you want to do fast rollover upgrades then dont forget to enable logical replication so you can stream data to a newer instances via their db migration tool.

kulminaator 2020-01-28T11:34:31.036200Z

Talking of fancy stuff, anyone using cockroachdb with java or clojure ? Happy / not happy ?

orestis 2020-01-28T12:25:00.036900Z

Thanks for the tip, I’ll look into that

orestis 2020-01-28T12:26:43.039600Z

Oh yeah I’m just spoiled because we use Mongo Atlas and Mongo ObjectRocket and they take care of mostly everything. Apart from storage/instance size/IO there’s not much else to tweak

dharrigan 2020-01-28T12:26:44.039800Z

Tis a horrible name

dharrigan 2020-01-28T12:26:56.040300Z

It's just another hard sell to the boss - cockroach db?

😄 1
dharrigan 2020-01-28T12:27:04.040600Z

I mean, pick a nicer sounding name

dharrigan 2020-01-28T12:27:24.041100Z

DuracellBunnyDB

1
🔋 1
🐰 1
dharrigan 2020-01-28T12:27:30.041400Z

keeps on going and going and going....

kszabo 2020-01-28T13:29:04.041500Z

I mean, it’s persistently alive 🙂

👍 1
kulminaator 2020-01-28T16:04:09.042600Z

Name is horrible but design seems good

exit2 2020-01-28T16:06:28.043300Z

Anyone have advice on updating (batch) multiple rows via psql?

exit2 2020-01-28T16:07:25.043600Z

[UPDATE import.spaces (id, import_timestamp, record, table_name) VALUES (?, ?, ?, ?), (?, ?, ?, ?), (?, ?, ?, ?) 89dc51b1-9763-4ffc-99e3-a435d34f58aa #inst "2020-01-28T16:06:57.000000000-00:00" {"foo":"onelkajsdlfkjalskdjflkajsdf"} spaces 05566595-1703-4eb3-acb7-5ef56d8fcd95 #inst "2020-01-28T16:06:57.000000000-00:00" {"foo":"twokdsksksksk"} spaces 1832fe59-a0c9-42b8-871d-143c344c9993 #inst "2020-01-28T16:06:57.000000000-00:00" {"foo":"thsksksksksksk"} spaces]

exit2 2020-01-28T16:07:34.043900Z

I tried something like this but it doesn’t seem to work

2020-01-28T17:10:19.044700Z

that isn't correct sql syntax for update, that is insert syntax with the word update in front of it

exit2 2020-01-28T17:29:20.045200Z

Figured it out, thanks @hiredman