News for hackers. Stuff that matters.
Re:What’s so exciting about Postgres? by Animats on Friday October 30, 2020 @04:37PM (#24946651)
Databases shouldn't be exciting. They should just work.

The main reason webcrap works is because the databases underneath work. If the Javascript crowd had to manage data storage, nothing persistent would work reliably.

Re:What’s so exciting about Postgres? by dragonwriter on Friday October 30, 2020 @05:30PM (#24947074)
> Databases shouldn't be exciting. They should just work.

With enough experience with the alternative, things that just work are exciting.

Re:What’s so exciting about Postgres? by loco5niner on Monday November 02, 2020 @01:56PM (#24971660)
And it's wonderful to work with someone whose stuff just works
Re:What’s so exciting about Postgres? by auggierose on Friday October 30, 2020 @07:25PM (#24947807)
Amen.
Re:What’s so exciting about Postgres? by raarts on Saturday October 31, 2020 @04:08PM (#24954781)
Hear, hear.
Re:What’s so exciting about Postgres? by anakaine on Sunday November 01, 2020 @05:53AM (#24958627)
Seconded.
Re:What’s so exciting about Postgres? by baybal2 on Friday October 30, 2020 @06:04PM (#24947317)
PG steamrolls every other general purpose database, and has tons of extensions, and frontends so you can use it in any database paradigm.

With 30m minutes of time, you can turn it into a document db, log/time series db, columnar, graph, key value, whatever

Re:What’s so exciting about Postgres? by pricechild on Friday October 30, 2020 @06:15PM (#24947375)
I bet we'd both seriously consider (if not prefer) sqlite over postgres in a bunch of scenarios?
Re:What’s so exciting about Postgres? by edoceo on Friday October 30, 2020 @06:33PM (#24947499)
I love PG and sometimes I see some cases where maybe Sqlite would work "better" but just as soon as it starts to get a little bigger I start missing all the cool stuff that PG has.

Sqlite is still awesome but PG is more awesomer. And since the cost is the same I just stick with PG now. Unless I'm resource constrained (which for my work is rare)

Re:What’s so exciting about Postgres? by api on Friday October 30, 2020 @06:27PM (#24947464)
SQLite is amazing, and “lite” is really not fair. I’ve seen it handle 1tb+ with at least decent performance.

It’s not a replacement for a real DB but it is damn close.

Re:What’s so exciting about Postgres? by Rodeoclash on Friday October 30, 2020 @06:49PM (#24947593)
Actually as I understand it (and a couple of minutes Googling doesn't back up my case) the "lite" on the end is pronounced "ite" and refers more to SQL as a geology like term. In other words, the SQL is a rock.
Re:What’s so exciting about Postgres? by eindiran on Friday October 30, 2020 @07:03PM (#24947673)
Even if that was what the name was intended to be, the vast majority of people pronounce it as SQL - lite. (In fact, this is the first I've heard of someone pronouncing it that way).

The documentation seems to suggest that it is in fact pronounced "SQL-lite": https://www.sqlite.org/fullsql.html

> Don't be misled by the "Lite" in the name.

Re:What’s so exciting about Postgres? by robertlagrant on Friday October 30, 2020 @06:30PM (#24947489)
It's not, because it is a real DB. It's just one for single user access only.
Re:What’s so exciting about Postgres? by bachmeier on Friday October 30, 2020 @07:43PM (#24947893)
> Think of SQLite not as a replacement for Oracle but as a replacement for fopen().

https://sqlite.org/about.html

Re:What’s so exciting about Postgres? by Koshkin on Friday October 30, 2020 @08:56PM (#24948213)
Well sure, it’s better be thought of as a replacement for fopen() than one for Oracle. (Unless you were thinking of buying Oracle in order to use it on your desktop.) An even better way would be to compare it with MS Access, for example.
Re:What’s so exciting about Postgres? by zarkov99 on Friday October 30, 2020 @07:18PM (#24947770)
sqlite is a wonderful, amazing, file manipulation API. If single-threaded file manipulation is what you need, its great. But is not an application backend in the way PG can be.
Re:What’s so exciting about Postgres? by lhnz on Friday October 30, 2020 @07:32PM (#24947851)

  > If the Javascript crowd had to manage data storage,
  > nothing persistent would work reliably.
There are different incentives to writing UIs than there are when you're writing a backend. Often a business needs you to iterate very quickly, so people change their practices to suit this. Some are able to get away with never raising the quality bar once they finish iterating and it's unfortunate how the industry allows this. Additionally, there are, of course, teams and companies that want high quality code, but even here quality is defined differently from how it would be for data storage logic. For instance, it often means "high framerate" and "easy to understand", instead of "optimal" and "robust".

There are less JavaScript engineers writing backend code, and most that do this are generally making simplistic CRUD Node.js apps. However, there are companies and people that specialise in high-quality complex Node.js apps, and they try just as hard as backend engineers from other programming languages to do this well. (I'm thinking of projects made by developers on the core Node team. I've seen good backend code there, perhaps because they're more aware of lower-level concerns.)

I personally write a lot of JavaScript/TypeScript code and I try to do a good job, but a "good job" is defined differently depending on the kind of product you're creating.

Edit: I just realised you are _the John Nagle_, so you likely have a more refined taste in certain kinds of programming than I do, however I think my point about incentives probably still stands.

Re:What’s so exciting about Postgres? by msla on Friday October 30, 2020 @04:54PM (#24946797)
> Databases shouldn't be exciting. They should just work.

A complicated thing which just works is exciting.

Re:What’s so exciting about Postgres? by bigbubba on Friday October 30, 2020 @05:11PM (#24946937)
One man's exciting is another's snorefest. A lot of people would probably laugh at the suggestion that anything involving computers could be exciting.
Re:What’s so exciting about Postgres? by systemvoltage on Friday October 30, 2020 @05:20PM (#24947008)
It is unproductive to talk about subjective opinions of excitement.

The GP was referring to "Databases shouldn't be exciting" - not in the traditional sense of the word, but a metaphor that hinges on "excitement" being new features, frivolous decorations, unnecessary tangents, losing vision of what a database should do, frantic patching and heated bikeshedding discussions.

It wasn't meant as "Ooooo I am excited about a database".

Re:What’s so exciting about Postgres? by bigbubba on Friday October 30, 2020 @05:27PM (#24947068)
I think you're restating my point.
Re:What’s so exciting about Postgres? by jeff-davis on Friday October 30, 2020 @06:40PM (#24947543)
A lot of people imagine databases that way, but they are complex beasts with a lot of features. Everyone seems to say features don't matter, except of course for the ones that they use. Which is often a growing set as your application matures.

All of these features are exciting to the people that can use them.

Re:What’s so exciting about Postgres? by systemvoltage on Friday October 30, 2020 @05:12PM (#24946944)
It is often downvoted to talk about the "javascript crowd" on HN, but I've worked in software industry long enough to unequivocally and with certainty say that it totally lives up to the cliches.

It never gets old to scold people that are not serious, disciplined and principled in their endeavors that affect the rest of the world. Javascript community absolutely deserves the avalanche of criticisms they face.

It is the reason why the modern web sucks, and frankly - I wish folks at Postgres would develop a new web standards including browsers that are not governed by corporations and can be implemented in a couple of weeks. Not trivializing what goes into building browsers, but making the whole standard small enough so any one can build a browser during a sabbatical.

Re:What’s so exciting about Postgres? by noir_lord on Friday October 30, 2020 @06:04PM (#24947320)
I'm seeing this in action now, the difference between the backend code and the frontend code is stark and the backend code isn't up to my standard either (and my standards aren't that high, I know I'm merely competent for many places).

It just seems to be the nature of the web side of things, lots of sloppiness.

The devs are smart enough, they just don't think and it shows.

That or they use something but clearly don't understand the thing they are using.

I replaced nearly 500 lines of code with ~60 by taking a bunch of massive conditonals re-ordering them then extracting them into methods and returning on the simple case.

This isn't voodoo, you have to work harder and remember more to do it the wrong way.

Also comments, they don't seem to understand you document why you did the thing, not what you did, what you did is in the code, I don't trust your comments to tell me what you did, I want to know why you did it.

That and general documentation (cross link stuff, link at the top of the class to the documentation in the wiki, update the documentation when you get a ticket that changes the behaviour, write the high level flow in plain english a 10 year old could understand).

rant over.

I actually like my job, the people are lovely and the work is interesting its just frustrating when an ounce of thought saves a pound of cure.

Re:What’s so exciting about Postgres? by edoceo on Friday October 30, 2020 @06:19PM (#24947412)
Hello fellow "merely competent" engineer. I recommend we both remove "merely" from our title. Inexperience grows from the bottom, I've gotten "better" by simply being too stubborn to get worse. Keep up the mediocre work!
Re:What’s so exciting about Postgres? by donw on Friday October 30, 2020 @07:15PM (#24947752)
> Inexperience grows from the bottom, I've gotten "better" by simply being too stubborn to get worse.

That is quite possibly one of the best quotes I have heard on how to approach discipline in engineering.

Re:What’s so exciting about Postgres? by systemvoltage on Friday October 30, 2020 @11:35PM (#24948948)
I don't understand, can you please explain?

> Inexperience grows from the bottom

In what way?

> I've gotten "better" by simply being too stubborn to get worse

How does one get better by wanting to get worse?

This makes no sense to me.

Re:What’s so exciting about Postgres? by btschaegg on Saturday October 31, 2020 @03:18AM (#24949667)
I read it as "refusing to get worse". Which implies that your environmnent is getting worse, making you better by comparison.

I'm not sure I agree, but I can understand the sentiment.

Re:What’s so exciting about Postgres? by btschaegg on Saturday October 31, 2020 @03:23AM (#24949679)
I agree about (and am frustrated by) everything you said here, but:

It's not just "the web side of things". Which makes it even more scary.

Re:What’s so exciting about Postgres? by watermelon59 on Saturday October 31, 2020 @01:09AM (#24949268)
> That or they use something but clearly don't understand the thing they are using.

You know, I feel like this has bled into backend development too. And it's not entirely the fault of engineers... or so I like to think, to excuse myself :P

What worries me a lot is that I find myself being one of those people, not being able to fully help my situation.

It's just... too much. It seems like every few months a new thing pops up and everyone suddenly wants to adopt it. And even if you try and resist it because it's not necessary, someone from above (e.g. CTO) will decide that the whole org has to adopt that and now you're screwed.

In a typical backend application you have to deal with:

- Application framework

- Testing framework

- Logging framework

- Metrics framework

- Tracing

- Visualization tool(s) for the three things above

- CI

Which is already quite a bit, but obviously manageable and you could get pretty knowledgeable on all of that if they stay static.

But hey, now your org has to expose every service on gRPC. Ok, one more thing to tack onto your app...

Now everyone has to expose GraphQL endpoints too!

Oh and next month we're migrating to a new metrics solution. Because. Great, let's throw away all the knowledge built on the old one and scramble to migrate to the new things we don't have time to learn fully.

Alright, now let's start writing new services in this new language.

And now everyone has to throw events on this new message bus thing that some team over there built using Kafka!

Finally, let's move everything off of AWS managed services and onto Kubernetes! Yay!

All of that can easily happen within the span of 2-3 years. And in the meantime you have to deal with on-call rotations, customer issues, implementing new features... and if you're a senior dev you're also busy mentoring folks, going to meetings with other teams, etc etc.

You know what I'm talking about, right? Over time, I feel like it's becoming impossible to achieve mastery of anything. There are way too many things to learn to be able to make sense of the whole, and no time to do deep dives on all of them. And then there's all the new stuff that keeps being adopted.

And then things blow up and they're freaking mysterious and when you finally find out what it was, you realize you'd only have been able to catch that problem beforehand if you'd read the freaking source code for some library you adopted.

It's madness. It's pure hell.

Boy I miss working on low level code.

End rant.

Re:What’s so exciting about Postgres? by spacemanmatt on Saturday October 31, 2020 @06:13AM (#24950216)
I have been working with a guy who constantly avoids popular libraries. Constantly. And his product is constantly more accurate (factored, few bugs) and then he can document it without referring to any outside sources. It's pretty good discipline to write things yourself and only grow into libraries when you have proven you know what you need.
Re:What’s so exciting about Postgres? by noir_lord on Saturday October 31, 2020 @07:53AM (#24950690)
That is where the nuance lies, in not reaching immediately for a library when you have a problem, explore the problem until you understand the solution then you know if the library is a good fit or not.

Half my battles with my team are them wanting to pull in dependencies, sometimes it's crazy like a wrapper dependency to pull in a different dependency when it's simpler to just pull in the indirect dependency and use it directly.

It's very much a thing that comes from experience though, when you've been bitten by upstream enough to be a little circumspect about it.

Re:What’s so exciting about Postgres? by noir_lord on Saturday October 31, 2020 @05:07AM (#24949988)
All of this.

I agree with all of it, particularly "Lets throw away X and switch to Y, we lose all the domain knowledge we have with X but Y others this absolutely tiny marginal improvement, so it's worth it!"

As a lead I spend a lot of time pushing back on adding stuff until someone has made the case why we should add it.

You want to use Y, great - document why you want to add Y, what benefit it brings, who runs Y, where is the code, how many maintainers does it have, is it well tested, if want to remove Y later is it a big job, what does it offer that we can't currently do etc.

Re:What’s so exciting about Postgres? by soneca on Friday October 30, 2020 @06:19PM (#24947409)
Should I assume from your comment that you never saw code worth improving other than those written by JavaScript developers?
Re:What’s so exciting about Postgres? by robertlagrant on Friday October 30, 2020 @06:29PM (#24947482)
Ah, pointless exclusion of the middle.
Re:What’s so exciting about Postgres? by noir_lord on Friday October 30, 2020 @06:23PM (#24947437)
No.
Re:What’s so exciting about Postgres? by dfee on Friday October 30, 2020 @05:33PM (#24947090)
That’s quite the perspective.

It’s a big enough world where you don’t have to interact with every technology that exists, but this is one of the more prevalent ones - and you might find it useful to make peace with that community.

Anyway, good luck out there.

Re:What’s so exciting about Postgres? by dkarl on Friday October 30, 2020 @07:02PM (#24947662)
It's a stereotype, and like a lot of stereotypes, it has a little bit of statistical truth, but I don't think it does justice for the excellent front-end engineers that do exist and whom I've worked with personally.

That said, there is some truth in it. The thing about the back end is that there's no satisfaction in it other than the satisfaction of doing it well and earning the esteem of peers, so most back end developers are paying attention to the quality of the code they write. The front end has other attractions as well, and many front-end developers start out focused on those attractions, and learn by experience (if they learn at all) that writing high quality code is related to the cool stuff that got them into programming in the first place.

Re:What’s so exciting about Postgres? by systemvoltage on Friday October 30, 2020 @11:40PM (#24948969)
I didn't mean us to be divisive. Backend engineers need good front-end partners to be successful. Front-end engineers depend on the backend folk to not fuck shit up, which happens time and again.

I meant that the developer community, the folks that are at the helm of developing Javascript frameworks (gahhhh!) and other shenanigans, the entire browser based ecosystem just reeks of incompetence, lack of discipline and rigor.

Frontend and Backend engineers should get together and build a better system that serves both well. That's what I meant by asking Postgres core devs to build front-end tools, something like Gemini [1].

[1] https://gemini.circumlunar.space/

Re:What’s so exciting about Postgres? by jbverschoor on Friday October 30, 2020 @11:11PM (#24948862)
Sorry, but I can’t agree.

Yes, they are capable of making great software, but it’s exactly what gp said... they don’t think. I’ve seen so much code which looks nice from the outside, abd is all structured. But if you start reading, I’m riddled wtfs and questions about why things weren’t done in a more simple concise and stable way.

Re:What’s so exciting about Postgres? by watermelon59 on Saturday October 31, 2020 @12:54AM (#24949215)
That's my experience too.

Recently had to deal with some Slack bot written in js at work, and my coworkers had to deal with me ranting about that crap for a whole afternoon.

The way I put it was, this code was written in the most complicated way possible, for no apparent reason.

Re:What’s so exciting about Postgres? by postit on Friday October 30, 2020 @06:40PM (#24947542)
I agree. We’ve also spent the last 10 years trying to make web app behave like desktop apps and they are still not matching.
Re:What’s so exciting about Postgres? by erokar on Friday October 30, 2020 @06:20PM (#24947423)
Typical bitter backend developer spew. Works with Java or C# and hasn't explored much more than OO and procedural. Threatened by anything new, creative or explorative. Stuck in his ways and prefers to do mundane, uncreative and repetetive tasks, like writing boilerplate to get stuff in and out of a database. Soon to be automated away by serverless.
Re:What’s so exciting about Postgres? by spacemanmatt on Saturday October 31, 2020 @06:34AM (#24950308)
Typical frontend developer spew. Works with JavaScript or Emscripten, hasn't dealt with data integrity, scale, or security challenges. Threatened by people who build things from scratch. Stuck writing handlers, never to see the whole architecture. Soon to be replaced by GPT-3.

Thank you, this has been entertaining.

Re:What’s so exciting about Postgres? by systemvoltage on Saturday October 31, 2020 @06:06PM (#24955593)
This is one of the funniest rebuttals on HN.
Re:What’s so exciting about Postgres? by spacemanmatt on Wednesday November 11, 2020 @04:46AM (#25056992)
I was thinking about the exchange, and it dawned on me that GPT-3 has really demonstrated frontend generation capability. I'd absolutely love to see it build my app's data layer from description (don't call it an ORM!) but I don't even know where to start looking for that.
Re:What’s so exciting about Postgres? by api on Friday October 30, 2020 @06:43PM (#24947557)
Ooh, permanent lock in to a single company’s bill by the second mainframe! How exciting!
Re:What’s so exciting about Postgres? by tinkertamper on Saturday October 31, 2020 @12:01AM (#24949034)
I see this criticism a lot for serverless but I don’t see it in reality. Serverless is still just running code, the only part that wouldn’t be portable is the entrypoint data structure which is amounts to practically nothing.
Re:What’s so exciting about Postgres? by api on Saturday October 31, 2020 @08:09AM (#24950757)
The devil is in the details. How many little things would need to be changed, refactored, or rewritten to move to another host?
Re:What’s so exciting about Postgres? by jschwartzi on Friday October 30, 2020 @06:27PM (#24947462)
Good luck running serverless code in a lightbulb.
Re:What’s so exciting about Postgres? by outside1234 on Friday October 30, 2020 @06:36PM (#24947516)
Re:What’s so exciting about Postgres? by jschwartzi on Tuesday November 03, 2020 @05:19PM (#24984675)
Last time I looked at Azure IoT Hub for anything I was baffled by the way their system used MQTT but didn't provide general-purpose MQTT access. Frankly they're not a great example of a company understanding how these devices are supposed to work.
Re:What’s so exciting about Postgres? by soneca on Friday October 30, 2020 @06:14PM (#24947371)
Please explain further what negative characteristics do you apply to the ”js crowd“ as a whole.

As a developer who only develops in JavaScript, I feel personally attacked by your post, so I would appreciate if your attack could be more specific to the point of being constructive or at least informative.

Re:What’s so exciting about Postgres? by hashtagmarkup on Friday October 30, 2020 @05:20PM (#24947004)
> If the Javascript crowd had to manage data storage, nothing persistent would work reliably.

Wait until this guy learns what the JS in "json" column types means, and how the largest webcrap sites rely on them for persistence.

Re:What’s so exciting about Postgres? by LukeShu on Friday October 30, 2020 @06:48PM (#24947588)
Note that 'Animats didn't comment on JS as a technology, he commented on the crowd.

In 2017 Bryan Cantrill gave a wonderful talk titled "Platform as a Reflection of Values: Joyent, Node.js and Beyond" https://vimeo.com/230142234 In it, he talks about how even though they liked JS as a technology, they came to realize that the values of the JS/Node.js community differed from their values at Joyent.

In the talk (at around 19:30), he identifies that in 2014 Joyent's core values wrt node.js were "debuggability", "robustness", and "stability"; while the core values of the broader node.js community were "approachability", "expressiveness", and "velocity". And there's nothing wrong with either of those sets values, but they're not the same!

With that lens, I'd characterize the parent comment as contrasting the PostgreSQL team's core value of "robustness" with the Javascript crowd's core value of "velocity". That's a distinction in values, not in technology.

Re:What’s so exciting about Postgres? by edgyquant on Friday October 30, 2020 @06:53PM (#24947612)
Json has nothing to do with the persistence part.
Re:What’s so exciting about Postgres? by hashtagmarkup on Friday October 30, 2020 @10:59PM (#24948812)
If you need to persistently store frontend state in the backend, would it not be easier to use the native frontend data format?

It's not entirely about persistence... it's about the ease and reliability of the persistence.

Re:What’s so exciting about Postgres? by edgyquant on Saturday October 31, 2020 @12:46AM (#24949194)
My point is that that JSON isn’t being delivered via a js db but instead translated from data stored in a database written in C. So the “what about json” gotcha isn’t as good as it was made to seem.
Re:What’s so exciting about Postgres? by hashtagmarkup on Saturday October 31, 2020 @01:24AM (#24949334)
My point is that JSON is being supported. So the "dismissal of facts" isn't as thoughtful as it was made to seem.
Re:What’s so exciting about Postgres? by edgyquant on Saturday October 31, 2020 @01:38AM (#24949379)
No it isn’t though? JSON is used, by developers, as an intermediary to exchange data pulled from a db. Your point that json is proof that the GP comment is false is not even a point but some kind of fallacy akin to a strawman.
Re:What’s so exciting about Postgres? by hashtagmarkup on Saturday October 31, 2020 @02:46AM (#24949589)
Your inference of my intentions, as an intermediary to deflect from the facts presented, is proof that you're trying really hard to be edgy. Akin to a strawquant.

The people behind javascript provided the object notation technology that has been absorbed by Postgres. It is not only being used to exchange data (as a standard text field would be used), but can be used to QUERY data. The database is aware not only of the JSON text string representation, but of the object itself.

Re:What’s so exciting about Postgres? by edgyquant on Saturday October 31, 2020 @01:10PM (#24953171)
I’m not being edgy you took a data format and pretended it was a refutation when it wasn’t and isn’t.
Re:What’s so exciting about Postgres? by hashtagmarkup on Saturday October 31, 2020 @02:32PM (#24954001)
What does the JS in JSON stand for? Where did it come from?
Re:What’s so exciting about Postgres? by edgyquant on Saturday October 31, 2020 @11:50PM (#24957089)
What does that have to do with JSON being an intermediary language and not the actual persistence part? What part of that don’t you understand and I’ll try to explain it for you
[dead]
Re:What’s so exciting about Postgres? by edgyquant on Sunday November 01, 2020 @02:59AM (#24957905)
I understand perfectly the difference between a system and a format. You either don’t or you’re trolling (and dishing out ad hominems to boot.). Reddit would be more suitable to your posting style, we come here with a higher expectation of them being actual discourse and intellectual honesty.