Wait... PostgreSQL can do WHAT?
HTML-код
- Опубликовано: 31 май 2024
- Is it even a database anymore?.. I'll show you how PostgreSQL ALONE can replace ALL your backend stack components.
0:00 - is it even a database anymore?
1:15 - the quickest history of PostgreSQL
2:34 - object-relational database
4:38 - table inheritance
6:03 - pg_trunk: a package manager for PostgreSQL extensions
7:31 - stored procedure that uses python's pandas
7:55 - your database is not a DUMB store
8:38 - PostgreSQL's FEATURE OF FEATURES
9:04 - pg_cron & hstore: replacing redis cache
10:53 - NOTIFY/LISTEN: replacing redis pub/sub
11:51 - pgmq: replacing message queue like SQS
13:10 - JSONB: replacing MongoDB
13:29 - NoSQL vendors mimic SQL
14:26 - Apache AGE & TimescaleDB: replacing graph and time series databases
15:09 - FTS: replacing ElasticSearch
16:20 - pgml: LLM and chatbots running in PostgreSQL
16:39 - Postgrest: no-code REST API for your DB tables
18:06 - pgtap: unit-testing for PostgreSQL
18:42 - pg_graphql: no-code GraphQL API for your DB tables
19:06 - Omnigres: PostgreSQL as a platform
19:25 - "boring technology" and "radical simplicity" with PostgreSQL
20:03 - trying to play pg_doom (Doom in PostgreSQL)
Code & links from the episode: github.com/vivus-ignis/the-ar... - Наука
PostgreSQL is my favorite OS
Wait til you use it as a compiler.
Is it better than Emacs?
PostgreSQL is my favorite motherboard
It just needs a nice editor, just like emacs (emacs also needs a great editor)
@@creativecraving Both operating systems, PostgreSQL and Emacs have the same problem: they lack a good editor.
The chosen terminal width should be counted as war crime.
I hear you. That will change in the next video.
echoed
Relic of a past time. Thankfully we have better tech now 😂
Yes especially terrible on ultrawide monitors.
@@TheArtOfTheTerminal also could you go a little slower when showing the examples? It's like you type, execute and promptly switch to another thing - maybe some commentary during the typing?
I was in the MariaDB IRC to report a bug back in 2014, one of the devs said "I dunno I use postgres", so I switched the project I was working on at the time to postgres (equivalent connector API usage worked instantly without the bug) and it's been my go to ever since :P
Niice
lol
😂
The problem with many plugins is the significant lack of documentation and support. Numerous plugins are written with awful documentation leading to considerable time spent trying to figure out how it works, only to find that there are undocumented issues to deal with. That is the downside of having people develop what they feel like and then walk away.
@caty863 There's one reason.
That's the problem of opensource in general imo. Remember corejs story? www.theregister.com/2020/03/26/corejs_maintainer_jailed_code_release/
@@TheArtOfTheTerminal Happened shortly after I started using ReiserFS as well. "BDFL/Primary Developer goes to prison" is not a new story for Open Source. One of the reasons major projects transition to some sort of foundation stewardship model
@@TheArtOfTheTerminalnot only in opensource code
100% agree. frustrating as fuck.
"But can it run Do..."
"Yes."
I am sold!
Omg it's real. jfc
Never get rid of these sounds you used. The soundtracks, typing sounds etc.. it's awesome
ASMR for nerds :) Thanks for the feedback!
The reason MySQL was fast was that it was missing a lot of basic features and wasn’t even ACID compliant. At that point it could hardly be considered a real database.
Still glad I took the time to evaluate different databases and found PostgreSQL, instead of blindly following the LAMP crowd.
I’ve been a happy PostgreSQL user for over 20 years.
yeah used to make me so mad back then to hear devs at work go on and on about MySQL. When I would bring up ACID and ISO SQL Standard compliance -- and how that MIGHT be useful if they ever need to switch databases -- I was just met with blank stares. It's like all they wanted was a "bit bucket" or something. What's worse is, who paid the price for this stupidity? I have yet to hear of anyone's business or career ruined for being so ignorant of these critical issues. If anyone knows of any good stories, please share 🙂 It's like they all got away scott-free and moved on -- now all those guys would probably talk about how much they love PSQL!
Fast? We dumped MySQL because of all the performance issues with it.
Postgres is faster than MySQL. I switched in 2016 and never looked back.
@@CalifornianViking It wasn't faster in the late 90s or early 2000s, when LAMP was the hot new thing and everyone was using it. Or earlier than that when Mod Perl was the backend of choice for "real" developers.
But more to the point MySQL had more tools built around it and was easier to get into. Everyone learned it because it was easy to learn. PostgreSQL had more functionality but a bit more of a learning curve.
Obviously things have changed since then.
@@beepbop6697 It was considerably faster than Postgres back in the 90s, for the reasons I stated. Postgres has always been a reliable database, mySQL hasn't.
At my former job our postgres was the message queue, with pub/sub and triggers. The caching layer, with tables with json columns, where triggers invidated the cache. The caching layer to slow on prem oracle servers, with materialized views and oracle-foreign datawrapper, a time traveled database producing data as it was using views and the temporal extension and a cron job orchestrator using pg_cron and stored procedures.
Interesting. Could you share your experience in terms of pros and cons for such an infra?
@@TheArtOfTheTerminal We had very good experiences allot of the trigger logic and the CI/CD part was not a problem. We were a small team of 4 developers. So we did not have big problems of resource sharing and silos. That would be something I would expect happen in larger setups.
Generally my experience was that it worked fine overall. Generally I like the minimalistic setup, so you don't need 5 gb of ram to have a local system up and running and the fact that all your services can talk to each other unhindered.
If we had 2-3 times as many developers, I would probably have suggested to split it more up.
Respect, that's a lean company
@quanghuynh9300 We experienced that the users network was the bottleneck using AWS aurora postgres. In inter data center traffic is much faster than network calls, so we could see that there where limited gains even for a faster in memory solution
I have no idea what I just read here lol
As a Postgres fanboy who's never spent much time with postgres plugins, this has made me so excited to try to use my PG databases to replace some of the other services I'm using! Thanks for the awesome video, easiest subscribe I've clicked in a long time!
25 years ago I learned that stored procedures are bad. Now I'm seeing this 😂🎉
Why are Stored Procedures bad? They make life so much easier. $.02
@@nandesueasy to make your future much more difficult. maintaining & remembering who did what where and debugging it all will be a nightmare.
Stored procedures should be treated just like any other code: with CI/CD practices. Debugging is always hard and imo the best you can really do to troubleshoot issues is to have great logging.
I don’t like to couple any logic to the database. In my opinion stored procedures should just be used to extend the functionality. In the company I work they implemented a lot of logic in the oracledb
to convert imported csv/excel and more to their own datastructure,
Sync data between customers
Do calculations for orders
Scheduled jobs like emails
And other stuff.
These are things I would have decoupled in external services or in a middleware.
In my opinion a database should just be used as a sink and source of data.
The only reason to touch a db is to improve performance.
Anything else should be done in a middleware.
I am coding for 5 years and managed a Database with 10k lines of code because of the procedures. It was very nice because once it is setup it is stable af. I used mariadb and it was the first time. We also made a lot of mistakes but the procedures were not one of them.
The main Problem was using an SQL db for a web scraper with very heterogenic data ^^, but that is just a tangent.
I'm glad the algorithm brought me here, what a gem. I use PostgreSQL every day and did not know it was this extensible. I enjoyed the video format and wish you success with the channel, subscribed!
Thank you for support!
Proud to have been using Postgresql since 1998
Hey this might be really random, but I am about to graduate from Uni, and I want to know what I can do to get a job in the tech field.
You seem like you got experience so I'd like some advice, cause I've been watching videos on how to get a job and tbh it's scaring me a bit lol.
Any help would really be appreciated ❤
I believe I began looking into it when it still used the rather "perishable" name Postgres95...
Sometimes the recommendation algorithm is scary accurate. This was exactly what I needed, and I didn't even have to search for it. Great video!
My thoughts and prayers are with you brave traveller
How I’m kinda feeling rn
My main thought reading these type of comments is "please don't have a great business idea and build it this way."
true
The online course I follow. this is what I read in the notes.
"We've moved away from Mongo to Postgres because our research on tech recruitment showed us that companies are looking for more SQL-based DB competence and moving away from Mongo and NoSQL."
Now RUclips recommended this to me.
SCARY isn't it ?
Be carefull what You wish for :). It is heading for "my wish exactly, as I wanted it... turned nightmare".
Great video! Loved everything about it! The way you presented was great, the pacing was good, and the trippy terminal display with the typing sounds was just awesome. Subscribed!
Thank you so much!
I have used Postgres extensively. Consolidated document databases, key value stores, graph, and time series. It is truly an amazing database.
Two things worth mentioning:
PostGIS is a geographic information system in Postgres, it can compete with ESRI.
AWS Aurora Postgres is fast.
Postgres + HTMX incoming
😂
On it
The GigaChad web stack
The "I made a grifting NFT pyramid scheme in 20 lines of code" tech stack
Very nice video! I love how you have long takes and not cut every half second like so many RUclipsrs do nowadays.
Thank you for the feedback. I too am tired of the flashy mr.beast-style editing :)
@@TheArtOfTheTerminal Agreed. It's so much more easier to focus on the content when the pacing is relaxed and there's no context switching a billion times per video. Keep up the good work!
I HATE it when a RUclipsr constantly cuts between two cameras for no reason.
Surprisingly good video. Had expected much less to be honest but the short explanations with shell examples were great.
Thank you for the feedback! Happy you liked it.
What an absolutely brilliant coverage of Postgres! Excellent video.
Postgres is one of the best operating systems ever! Good thing they even ship a decent database with it🎉
(I have only ever used Postgres for big projects and not more than 10% of features)
Incredible format for a video, love the sound effects lol
Great video, hope your channel grows!
Thank you so much!
As someone who built applications fully in the database (looking at you Oracle), it's not for the faint of heart.
Can you please tell us about some scary scenarios you've dealt with?
Oracle are way over engineered on the language side.
They have the sole intention of catering to enterprises. Their PLSQL documentation are humongous but tbh many of their features are useless and keep changing over the years which is probably intended since enterprises dev loves having to work on changing stuff without gaining nothing just to keep the money rolling in 😁
@@savire.ergheiz that's true but besides the point.
Building in the database is hard. Very hard.
@@RevHardt I took over a web application from someone who decided that building the entire app in postgres was a good idea.
And this was before the modern tooling that we have now.
They had a php frontend that acted as a proxy. Would convert the request into a stored proc and return the response to the client.
Holy lord that was a hard app to modify and debug.
@@RevHardt most of my other experiences came from working in a banking application built on oracle.
You don't know pain until you have to follow cascading triggers.
Loved this, cheers. Recently just moved to using Postgres for the first time, and am so glad I did
The dude went completely crazy at the end 😆😆😆😆😆
Nicely done video, good job and thank you! You deserve a million subscribers 😎
Thank you so much!
Postgres in 2024 looking great, thanks for sharing!
Thank you for the feedback!
I'm so happy right now. I just integrated Postgres as a module into my automation stack, treating it like a boring old table, column, and row relational rigamarole. That all works, but what you just revealed here tells me that I can adopt some way slicker strategies, and my stack now has a fully integrated solution for a whole range of problems I haven't even approached yet. I'm 100% on team BoB (Bet on Boring), but I would add that many boring things can combine to make very exciting things, as we are seeing in Postgresql's feature set.
Great video. Thank you. Its been one of my favorite DBs for years. Its interesting how everyone that keeps chasing the new shiny, wnd all the things i learn back in the 90s and 00s keep coming back.
Cryptocurrency comes back every few years. People rediscover scams and bad ideas all the time. Retro is just a weird form of chasing the new shiny. When we stopped doing things, there is usually a reason.
Great video. God I love PSQL and the open source community.
I would have loved for you to talk about scalability and partitioning (e.g., vs Scylladb)
Very cool vid man! Keep it up!
Great video, didn't know PosegreSQL is this awesome
also please have the terminal full screen or at least bigger horizontally so it can be more readable.
Thank you :) Will do.
It was fine a lot of the time, but eg 6:16 when you used rustup the progress bars overflowed
Fantastic video, very interesting and insightful. Keep up the good work!
Thank you! Happy you liked it :)
Oh, man. I'm sold. I had no idea is was such a complete solution. I'm feeling a database powered app development system coming up in my near future.
Bro your content is great!! Thank you!! I'm a believer now 🙌🏾💜
Thank you so much :)
Thanks for this, it's really helpful to know how much I can lean on Postgres in my various side projects. I've been getting a bit bogged down trying to emulate the tech stacks the 'big boys' are using, but... it shatters my focus and prevents me from getting things done. You've inspired me to try a different approach: I'll just put _all_ the backend stuff in Postgres by default, and only move things if/when forced. Seems liberating, honestly, to ignore all these hyped-up technologies and just get 💩done!
Thank you 🙏- I like the perspective to leave out network within the backend services 🤘
Outstanding content. At the moment you mentioned PostgREST you got my sub and 👍🏻
Great video! I'd love to know more about running Postgres in a production-like environment.
What a great video. Exciting topic, excellent presentation.
Thank you for the kind words :)
Haha wow! I've used postgres at my job for a via ORM, but I did not know it was this capable! I've always preferred pg due to its stability (IME) compared to mariadb when hosting stuff for my homelab. I'm kind of excited to look into some of this and build a project around it.
🤯 Having written MS SQL CLR Assemblies, I REALLY appreciate this approach! Thanks for making me see the light 😝
Happy you liked it!
This is one of the best PostgreSQL videos that I have ever seen on the web.
Thank you so much :)
Solid and well presented information, thank you for sharing this. Looking forward to the next one!
That is wild. I will try it out in my projects
Quality content, subscribed!
Great video. Thank you for your work.
I really enjoyed this video. Gained a subscriber.
This is a cool video! Thanks for informing us!
Thank you! Happy you liked it :)
You just earned a subscriber! 🙌
Side question, I saw you use Nvim to edit but your config files. but i often run into perm issues when trying to do so. how do you set that up?
What kind of perm issues, could you elaborate more on that?
Very informational video
Thank you so much for this video. I've been a professional Postgres fanboy since 2018 and you've still taught me a ton. Gonna go uninstall couchbase and give postgrest a try now...
Happy you liked it :) Thank you for the feedback!
Incredibly great video
Thank you very much!
Amazing video and exactly what i wanted to know more about
Glad you liked it :). Thank you for the feedback!
Super interesting thanks for sharing! Curious how well that can scale and at what point it becomes easier to scale application servers and keep the database lean.
Very useful video, THX bro.
Great video! Really interesting.
Thank you :)
Great video, learned some new stuff, thanks!
Thanks for the feedback!
Excellent video, cheers 👍
Thank you!
I Love this felling when you accidentally step on new rabbit hole. I was thinking about serving hmlx directly from the database. Seems like someone already did it 😂.
Wtf this is your 5th Video? You have really great Quality of making Videos
Thank you :)
Great video, thank you. Subscribed!
Thank you so much
Great video!
Thank you :)
you have earned a sub, ser. Wowzie
great research and summaries on postgres! I
Thank you :)
Yes! I love this so much!
Impressive and Very Cool ... Thank You for sharing .. Cheers :)
Nice demo.
Yea, I use arch btw, you can use PostgreSQL if you like :)
During my apprenticeship I was dealing with Oracle and DB/2 servers. That taught me the advantages of procedual languages like PL/SQL.
But those servers weren't exactly affordable to the common hobbyist at that time.
MySQL was fast but didn't have any sort of PL at that time. So I ended up starting to use PostgreSQL for my own projects, to get the features I had gotten used to and more.
It wasn't the fastest but it was more grown up than other free SQLs.
Amazing!
Thanks for great video, do you know if Postgresql has any alternatives to SQL Server analysis server?
Thank you for the feedback. Regarding OLAP on Postgresql, quick search finds this project www.hydra.so/, but not sure how it matches against SSAS.
Great video
Thanks, just subscribed 🎉
Do the managed versions of Postgres on the major cloud providers support all this?
Not all unfortunately. AWS (docs.aws.amazon.com/AmazonRDS/latest/PostgreSQLReleaseNotes/postgresql-extensions.html) and GCP (cloud.google.com/sql/docs/postgres/extensions) support hstore, pg_cron, pgcrypto, pgtap , Microsoft (learn.microsoft.com/en-us/azure/postgresql/flexible-server/concepts-extensions#extension-versions) -- one less (no pgtap).
I love the new Oracle Forms
Amazing video I Love PostgreSQL
As a GIS analyst, I like PostgreSQL simply because of its PostGIS extension. Its usage is very simple yet powerful to handle any use case I could ever come up with. Its support by GIS tools such QGIS is excellent too. In my opinion, I don't think there is any genuine excuse any team would choose Oracle or SQLServer over PostgreSQL. Yet, these sh**t dbms are still popular in some companies...for some mysterious reason. Applying the Ockham razor theory, I think it's because devs in these companies are lazy and don't want to migrate or learn a new tool, albeit superior. Or, sales guys at these providers have lined the pockets of the tech decision makers at these companies.
It's not mysterious. They have different priorities. Technical superiority is rarely a factor in most businesses.
That’s because commercial db like Oracle or MS come bundled with support. The only time you will see Postgres or MySQL in enterprise production massive environments is when some big cloud vendor like Amazon sells this as a service, and they probably won’t let you install many of the extensions shown
awesome video super informative
thank you for the video, subscribed immediately
Cool, thank you so much!
Thank you!
All those features should be use to power up dump storage, we should save all potential to expensive tasks related to storage. Thank you for your content!
you about to blow up on this one my boy
Quite impressive how this DB has evolved
awesome video
Came for PostgreSQL content, stayed for the Oblivion reference
one request - when ccapturing the terminal can you make the terminal wider to make it easier to read those longer output lines?
Absolutely, thank you for the feedback. This will be fixed.
So underrated channel, instant sub.
How to scale though do we just replicate it across nodes and do sharding on bg?
Well sure, there is no silver bullet really and in some cases you do need a dedicated in-memory key-value store or a full-text search cluster. What I do believe though is that most of the software projects don't need those specialized solutions. Same goes for microservices and kubernetes. Just because 1% of cool companies invented them at some point doesn't mean the other 99% should follow this path. Another ecommerce startup can absolutely be successful with boring PHP/Python, boring PostgreSQL and a dozen of boring dedicated servers.
@@TheArtOfTheTerminal Yep I agreed with you. Kunernetes are actually far slower and expensive for regular small startups.
Do these add-on are strong enough to hold production load and have they been benchmarked before with some real world use cases? It will be interesting to know.
Some years ago I have postgis project which host quite large amount of gis data via postgres. I haven't really thought of using these add-on though back then.
@@savire.ergheiz Depends. Some of them evolved into separate products (like TimescaleDB) with commercial support and all.
Truly the EMACS of databases
Damn bro. Nice video
Great job 😊
Thank you!
What a platform!
I started using Postgres back in the early 90's with version 4.2. Back then, you downloaded the code and built it yourself. Used table inheritance back then as well.
What keyboard and switches do you use?
HHKB Professional 2. Highly recommend btw :)
@@TheArtOfTheTerminal thx for answer :)
Does it have a median have function?
Where can I get that soundtrack? It scratches an itch I never knew I had ^_^
That's an AI-generated track :)
Is there an e-mail extension? There must be, right?
I'm imagining a table that you extend with context values to send into the template that is rendered before sending.
I guess it's possible to send emails via sendgrid or a similar service using PG http client extension.
Great Video.
Thank you
It's insane what's possible to do with PostgreSQL. From this 20 minutes wideo I get whole stack of technology to learn for next 2y...