PostgresTV 💙💛
PostgresTV 💙💛
  • 155
  • 124 541
To 100TB, and beyond! | Postgres.FM 100 | #PostgreSQL #Postgres podcast
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT+manually! You can also try TH-cam's auto-translation of them from English to your language; try it and share it with people interested in Postgres!]
Michael and Nikolay are joined by three special guests for episode 100 who have all scaled Postgres to significant scale - Arka Ganguli from Notion, Sammy Steele from Figma, and Derk van Veen from Adyen. They cover how their setup has evolved, what their plans are for the future, and get into the weeds of some fun and interesting challenges along the way!
Links to some of the things discussed:
* Arka Ganguli from Notion postgres.fm/people/arka-ganguli
* Sammy Steele from Figma postgres.fm/people/sammy-steele
* Derk van Veen from Adyen postgres.fm/people/derk-van-veen
* Thank you to yerrysherry on Reddit for the idea! www.reddit.com/r/PostgreSQL/comments/1cn8ajh/what_should_we_do_for_episode_100_of_postgres_fm
* Lessons learned from sharding Postgres at Notion (October 2021) www.notion.so/blog/sharding-postgres-at-notion
* Adding Postgres capacity (again) with zero downtime (July 2023) www.notion.so/blog/the-great-re-shard
* How Figma’s databases team lived to tell the scale (March 2024) www.figma.com/blog/how-figmas-databases-team-lived-to-tell-the-scale
* Updating a 50 terabyte PostgreSQL database (March 2018) www.adyen.com/knowledge-hub/updating-a-50-terabyte-postgresql-database
* Part 1: Introduction to Table Partitioning (July 2023) www.adyen.com/knowledge-hub/introduction-to-table-partioning
* Part 2: Partitioning at Adyen (October 2023) www.adyen.com/knowledge-hub/partitioning-at-adyen
* Part 3: Maintenance Under Pressure (January 2024) www.adyen.com/knowledge-hub/maintenance-under-pressure
* Fighting PostgreSQL write amplification with HOT updates (May 2022) www.adyen.com/knowledge-hub/postgresql-hot-updates
* Tracking HOT updates and tuning FillFactor (October 2022) www.adyen.com/knowledge-hub/postgresql-hot-updates-part2
* Partitioning your Postgres tables for 20X better performance (upcoming talk by Derk at Posette) www.citusdata.com/posette/speakers/derk-van-veen
* Figma, including Sammy’s team, is hiring www.figma.com/careers
* Notion’s engineering team is hiring www.notion.so/careers
* Adyen’s engineering team is hiring careers.adyen.com
~~~
What did you like or not like? What should we discuss next time? Let us know in the comments, or by tweeting us on @postgresfm PostgresFM, @samokhvalov samokhvalov and @michristofides michristofides
~~~
Postgres FM is produced by:
- Nikolay Samokhvalov, founder of Postgres.ai postgres.ai/
- Michael Christofides, founder of pgMustard pgmustard.com/
~~~
This is the video version. Check out postgres.fm to subscribe to the audio-only version, to see transcripts, guest profiles, and more.
มุมมอง: 820

วีดีโอ

Sponsoring the community | Postgres.FM 099 | #PostgreSQL #Postgres podcast
มุมมอง 12314 วันที่ผ่านมา
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT manually! You can also try TH-cam's auto-translation of them from English to your language; try it and share it with people interested in Postgres!] Michael is joined by Claire Giordano, Head of Postgres Open Source Community Initiatives at Microsoft, to discuss several ways to contribute to the Postgres community - from core contribut...
Full text search | Postgres.FM 098 | #PostgreSQL #Postgres podcast
มุมมอง 27421 วันที่ผ่านมา
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT manually! You can also try TH-cam's auto-translation of them from English to your language; try it and share it with people interested in Postgres!] Nikolay and Michael discuss full text search in Postgres - some of the history, some of the features, and whether it now makes sense to try to replace or combine it with semantic search. H...
Minor releases | Postgres.FM 097 | #PostgreSQL #Postgres podcast
มุมมอง 20228 วันที่ผ่านมา
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT manually! You can also try TH-cam's auto-translation of them from English to your language; try it and share it with people interested in Postgres!] Nikolay and Michael discuss Postgres minor releases - how the schedule works, options for upgrading to them, and the importance of reading the release notes. Here are some links to things ...
Custom vs generic plan | Postgres.FM 096 | #PostgreSQL #Postgres podcast
มุมมอง 221หลายเดือนก่อน
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT manually! You can also try TH-cam's auto-translation of them from English to your language; try it and share it with people interested in Postgres!] Nikolay and Michael discuss custom and generic planning in prepared statements - how it works, how issues can present themselves, some ways to view the generic plan, and some benefits of a...
LIMIT vs performance | Postgres.FM 095 | #PostgreSQL #Postgres podcast
มุมมอง 377หลายเดือนก่อน
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT manually! You can also try TH-cam's auto-translation of them from English to your language; try it and share it with people interested in Postgres!] Nikolay and Michael discuss LIMIT in Postgres - what it does, how it can help with performance, and an interesting example where adding it can actually hurt performance(!) Here are some li...
Buffers II (the sequel) | Postgres.FM 094 | #PostgreSQL #Postgres podcast
มุมมอง 251หลายเดือนก่อน
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT manually! You can also try TH-cam's auto-translation of them from English to your language; try it and share it with people interested in Postgres!] Nikolay and Michael return to the topic of using the buffers explain parameter - with a new analogy, some (conspiracy) theories of why it's still not on by default, and some related chat a...
Massive DELETEs | Postgres.FM 093 | #PostgreSQL #Postgres podcast
มุมมอง 383หลายเดือนก่อน
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT manually! You can also try TH-cam's auto-translation of them from English to your language; try it and share it with people interested in Postgres!] Nikolay and Michael discuss doing massive DELETE operations in Postgres - what can go wrong, how to prevent major issues, and some ideas to minimise their impact. Here are some links to th...
Logical replication common issues | Postgres.FM 092 | #PostgreSQL #Postgres podcast
มุมมอง 7442 หลายเดือนก่อน
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT manually! You can also try TH-cam's auto-translation of them from English to your language; try it and share it with people interested in Postgres!] Nikolay and Michael are joined by Sai Srirampur, CEO and Co-founder of PeerDB, to discuss how to overcome several logical replication issues. They discuss the protocol versions, minimising...
Don't do this | Postgres.FM 091 | #PostgreSQL #Postgres podcast
มุมมอง 4852 หลายเดือนก่อน
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT manually! You can also try TH-cam's auto-translation of them from English to your language; try it and share it with people interested in Postgres!] Nikolay and Michael discuss several "Don't do this" lists about Postgres - picking out their favourite items, as well as some contentious ones that could be clearer, or not included. Here ...
Search | Postgres.FM 090 | #PostgreSQL #Postgres podcast
มุมมอง 3462 หลายเดือนก่อน
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT manually! You can also try TH-cam's auto-translation of them from English to your language; try it and share it with people interested in Postgres!] Nikolay and Michael have a high-level discussion on all things search - touching on full-text search, semantic search, and faceted search. They discuss what comes in Postgres core, what is...
Health check | Postgres.FM 089 | #PostgreSQL #Postgres podcast
มุมมอง 2802 หลายเดือนก่อน
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT manually! You can also try TH-cam's auto-translation of them from English to your language; try it and share it with people interested in Postgres!] Nikolay and Michael discuss Postgres health checks - what they are, things to include, how often makes sense, and whether improvements to Postgres would increase or decrease the need for t...
superuser | Postgres.FM 088 | #PostgreSQL #Postgres podcast
มุมมอง 2023 หลายเดือนก่อน
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT manually! You can also try TH-cam's auto-translation of them from English to your language; try it and share it with people interested in Postgres!] Nikolay and Michael discuss the superuser role in Postgres - what it is, how and when it shouldn’t be used, and whether most cloud providers are right to not give us it (no prizes for gues...
transaction_timeout | Postgres.FM 087 | #PostgreSQL #Postgres podcast
มุมมอง 2643 หลายเดือนก่อน
transaction_timeout | Postgres.FM 087 | #PostgreSQL #Postgres podcast
Rails + Postgres | Postgres.FM 086 | #PostgreSQL #Postgres podcast
มุมมอง 3073 หลายเดือนก่อน
Rails Postgres | Postgres.FM 086 | #PostgreSQL #Postgres podcast
Why isn't Postgres using my index? | Postgres.FM 085 | #PostgreSQL #Postgres podcast
มุมมอง 6093 หลายเดือนก่อน
Why isn't Postgres using my index? | Postgres.FM 085 | #PostgreSQL #Postgres podcast
Overhead of pg_stat_statements and pg_stat_kcache | Postgres.FM 084 | #PostgreSQL #Postgres podcast
มุมมอง 3314 หลายเดือนก่อน
Overhead of pg_stat_statements and pg_stat_kcache | Postgres.FM 084 | #PostgreSQL #Postgres podcast
Modern SQL | Postgres.FM 083 | #PostgreSQL #Postgres podcast
มุมมอง 8494 หลายเดือนก่อน
Modern SQL | Postgres.FM 083 | #PostgreSQL #Postgres podcast
Bloat | Postgres.FM 082 | #PostgreSQL #Postgres podcast
มุมมอง 8234 หลายเดือนก่อน
Bloat | Postgres.FM 082 | #PostgreSQL #Postgres podcast
pgvector | Postgres.FM 081 | #PostgreSQL #Postgres podcast
มุมมอง 7134 หลายเดือนก่อน
pgvector | Postgres.FM 081 | #PostgreSQL #Postgres podcast
pgBadger | Postgres.FM 080 | #PostgreSQL #Postgres podcast
มุมมอง 5605 หลายเดือนก่อน
pgBadger | Postgres.FM 080 | #PostgreSQL #Postgres podcast
EXPLAIN | Postgres.FM 079 | #PostgreSQL #Postgres podcast
มุมมอง 3295 หลายเดือนก่อน
EXPLAIN | Postgres.FM 079 | #PostgreSQL #Postgres podcast
Partitioning by ULID | Postgres.FM 077 | #PostgreSQL #Postgres podcast
มุมมอง 5055 หลายเดือนก่อน
Partitioning by ULID | Postgres.FM 077 | #PostgreSQL #Postgres podcast
Hash indexes | Postgres.FM 076 | #PostgreSQL #Postgres podcast
มุมมอง 6896 หลายเดือนก่อน
Hash indexes | Postgres.FM 076 | #PostgreSQL #Postgres podcast
Constraints | Postgres.FM 075 | #PostgreSQL #Postgres podcast
มุมมอง 2556 หลายเดือนก่อน
Constraints | Postgres.FM 075 | #PostgreSQL #Postgres podcast
Events | Postgres.FM 074 | #PostgreSQL #Postgres podcast
มุมมอง 2626 หลายเดือนก่อน
Events | Postgres.FM 074 | #PostgreSQL #Postgres podcast
Subtransactions | Postgres.FM 073 | #PostgreSQL #Postgres podcast
มุมมอง 2456 หลายเดือนก่อน
Subtransactions | Postgres.FM 073 | #PostgreSQL #Postgres podcast
Companion databases | Postgres.FM 072 | #PostgreSQL #Postgres podcast
มุมมอง 3326 หลายเดือนก่อน
Companion databases | Postgres.FM 072 | #PostgreSQL #Postgres podcast
Blue-green deployments | Postgres.FM 071 | #PostgreSQL #Postgres podcast
มุมมอง 5527 หลายเดือนก่อน
Blue-green deployments | Postgres.FM 071 | #PostgreSQL #Postgres podcast
Data model trade-offs | Postgres.FM 070 | #PostgreSQL #Postgres podcast
มุมมอง 4227 หลายเดือนก่อน
Data model trade-offs | Postgres.FM 070 | #PostgreSQL #Postgres podcast

ความคิดเห็น

  • @rosendo3219
    @rosendo3219 2 วันที่ผ่านมา

    gratz boys on episode 100! always listening to you in my car while driving to my boring work

  • @bhautikin
    @bhautikin 3 วันที่ผ่านมา

    One of the best episodes!

  • @dshukertjr
    @dshukertjr 7 วันที่ผ่านมา

    Congrats on episode 100! Sorry if this has been covered in the past episodes, but I would love to know more about the following. 1. Why do you seem to discourage using foreign keys? 2. It seemed like all of the three companies rarely perform joins within their databases, but do they do they perform joins on the application layer? Is this common for large scale databases to not join within the database?

    • @NikolaySamokhvalov
      @NikolaySamokhvalov 14 ชั่วโมงที่ผ่านมา

      FKs are great and I personally use them everywhere. However, they have risks: 1) perf. overhead required to maintain them (that's ok usually), 2) perf. cliff related to multixact IDs - going to demonstrate soon with the PostgresAI bot.

  • @anbu630
    @anbu630 9 วันที่ผ่านมา

    Congrats on your 100th episode !! Watched your 1st one and here the 100th one as well :-)

  • @JamesBData
    @JamesBData 9 วันที่ผ่านมา

    Congrats on reaching episode 100!

  • @RajanGhimiree
    @RajanGhimiree 11 วันที่ผ่านมา

    Can you guys make a complete episode on logical replication, from configuration to replicate data from source server to replication server.

  • @davidcarvalho2985
    @davidcarvalho2985 16 วันที่ผ่านมา

    Okay, you guys convinced me. I will try pgbadger. Thanks for this interview by the way. Really nice

  • @kirkwolak6735
    @kirkwolak6735 16 วันที่ผ่านมา

    So, I was wondering... Wouldn't it be nice if there were 2-3 types of plans based on some of the values of the parameters, so you get the most optimum plan and maybe the optimizer does Parameter Peeking to determine which of the X plans to choose... And then I realized. Wow... The application could do this. Create 3 prepared statements for the same query. And execute against the one TUNED for the query parameter types forcing the best plan to be used by design... Hmmm... We have this situation. We have a complicated search. But when the value we are searching for is small (lots of hits) vs large (few hits). It wants to choose the wrong one after a few queries and then a switch. Unfortunately, this is inside of a Procedure where the statement is prepared around us. We would have to basically duplicate the complex query just to make the condition so that it executes the right right way. But I might still try that.

  • @kirkwolak6735
    @kirkwolak6735 23 วันที่ผ่านมา

    Yes, you should test with your extensions. You should have a few general procedures you run that exercise using all of the extensions. And you should monitor log sizes. In case something is going wrong, and it's only in the log files. I like using htop in linux, and watching how much memory the various threads are using and the total. In case memory consumption has changed... This can lead to issues. Reading the documentation for the release. YES, it is good documentation. But it can feel a bit overwhelming because they document so much...

  • @Marekobi
    @Marekobi 28 วันที่ผ่านมา

    This is gold !! :)

  • @pdougall1
    @pdougall1 หลายเดือนก่อน

    Can ya'll talk about the best way to think about adding indexes? What is the problem when adding too many on a table for instance. Or when to reach for one when a query is slow. Confounding factors when there are other queries using the same column (not sure that's relevant). I'm sure there is a lot to consider that are just unknown unknowns for me.

    • @NikolaySamokhvalov
      @NikolaySamokhvalov 26 วันที่ผ่านมา

      hey Patrick - have you listened to episode "068 Over-indexing"?

    • @pdougall1
      @pdougall1 26 วันที่ผ่านมา

      @@NikolaySamokhvalov I have not, but definitely will. Also looks like there's one on under indexing as well! Might be exactly what I'm looking for, thanks!

  • @kirkwolak6735
    @kirkwolak6735 หลายเดือนก่อน

    Michael, thank you for sticking to your guns to get your explanation out there. There is a subtle difference in the AUDIENCE you two seem to be addressing. Nikolay seems to not care about launching a long-running query... Because when he sits down, he likely either knows he has a problem already, OR he's got such deep experience in PG, that he knows to check a few thing before he starts pounding out a query. I believe he implies this when he talks about how he adds the LIMIT based on what he is expecting (eg, when he might be wrong, he will do a LIMIT 2 and let the error guide him). Whereas you were (IMO) driving from a Novice (like me) who *thought* that just adding a LIMIT was *always* a decent safety approach. And my understanding is currently limited to (LIMIT + Order By = Red Flag). Your point goes deeper than that. So, now I realize the correct formula is: (LIMIT + (Order By|Index Range Scan) = Red Flag). Meaning the optimizer might be doing what looks like a simple range scan on some column, but it is orthogonal to the data being found, and can quickly become a semi-seq_scan (find first row with the index, and the seq_scan in reverse until the number of records hit the limit... Which may never happen! Making it scan to the beginning/end). That's two wildly different target audiences. And I could be completely wrong. It's my guess. Of course I look up to both of you, so I apologize if I misstated your positions!

    • @michristofides
      @michristofides หลายเดือนก่อน

      Thank you Kirk, for the kind words and the wonderful summary! I think you're spot on, and am glad to hear it was helpful

  • @pdougall1
    @pdougall1 หลายเดือนก่อน

    Ya'll are great! Its really important to hear professional db people talking about how all of this works in practice. Beyond a basic explanation that can be found in books (books are also really important btw)

  • @hamzaaitboutou8563
    @hamzaaitboutou8563 หลายเดือนก่อน

    more of this please <3

  • @iury0x58
    @iury0x58 หลายเดือนก่อน

    Great content, guys! Binging the channel

  • @iury0x58
    @iury0x58 หลายเดือนก่อน

    Thank you for this content. Very nice

  • @kaal970
    @kaal970 หลายเดือนก่อน

    I want to understand it...man why no slides

  • @davidfetter
    @davidfetter หลายเดือนก่อน

    I just love the way this episode captured the processes that actually go into doing the thing! BTW, the repository for the web site is, as far as I know, also a git repository, and I suspect that rebase requests--NEVER use merge--would be easier to get into it than patches sent to the -hackers mailing list for the core code would be.

  • @keenmate9719
    @keenmate9719 หลายเดือนก่อน

    Looking forward for this one... paging and limits, it's like naming and cache invalidation :-)

  • @nishic1
    @nishic1 หลายเดือนก่อน

    Woww.Excellent video..Very informative..

  • @nitish5924
    @nitish5924 หลายเดือนก่อน

    What about massive updates ? We recently had a usecase where we have a postgres database that has 250 million rows and we introduced a new date column, we are facing so many issues in backfilling this column today. it would be great if you could share your insights on how to handle such massive updates

    • @NikolaySamokhvalov
      @NikolaySamokhvalov หลายเดือนก่อน

      it's very similar - batching is very much needed additional complexity is index write amplification - all indexes have to be updated (unlikje for DELETEs), unless it's a HOT UPDATE

    • @kirkwolak6735
      @kirkwolak6735 หลายเดือนก่อน

      @@NikolaySamokhvalov Excellent point on indexing adding writes. I would certainly add the column. Batch some updates. And only when updates are finished would I consider adding the index on that column. Otherwise it feels like a Footgun!

  • @awksedgreep
    @awksedgreep หลายเดือนก่อน

    What you need is UUID's across maybe 25 tables with FKs between each, no on delete cascade, and a need to keep the data from all 25 tables elsewhere(archive schema). Getting <200 deletes a second after moving the data off to the archive schema. Had one set of deletes on a large table going for 20 days. Not speaking from experience or anything. haha

  • @TimUckun
    @TimUckun 2 หลายเดือนก่อน

    Why doesn’t Postgres have unsigned integers? Also why doesn’t timestamp with Timezone actually store the Timezone of the timestamp? If my app is crossing time zones I really want to know the Timezone of the writer.

  • @wstrzalka
    @wstrzalka 2 หลายเดือนก่อน

    Love your podcast. Its fun to listen for both advanced and basic topics as always something new will pop up. And the attached articles list makes waiting for the next episode more bearable 🐘

  • @chralexNET
    @chralexNET 2 หลายเดือนก่อน

    One thing about timestamps. In my current project I only use timestamp without time zone, because I always save UTC for all my dates and times. If I do that I guess there are no problems with using timestamp without time zone then? Edit: Okay so reading more of the wiki article they suggest not doing that, because they think it is going to give you issues if you are going to do calculations with other timestamps that have time zones, but I am never going to do that, because all my dates and times will be in UTC.

    • @kirkwolak6735
      @kirkwolak6735 2 หลายเดือนก่อน

      I switched away from that, and one of the reasons was DST.

    • @chralexNET
      @chralexNET 2 หลายเดือนก่อน

      @@kirkwolak6735 I don't know why that would cause any issues. UTC is not affected by DST. What a client application does when it receives a timestamp is to work with that timestamp in UTC in its logic, and for displaying the timestamp it explicitly converts it to the local time of the client by adding the time zone offset to the timestamp.

  • @ilyaportnov181
    @ilyaportnov181 2 หลายเดือนก่อน

    comparasion of timestamps is nontrivial topic at all due to timezones :)

  • @andherium
    @andherium 2 หลายเดือนก่อน

    Would love it if you guys could make a video on schemas and roles

  • @dartneer
    @dartneer 2 หลายเดือนก่อน

    a lot of gold bits here! Thank you guys..👏💪

    • @PostgresTV
      @PostgresTV 2 หลายเดือนก่อน

      thanks! keep watching - and let us know if there are ideas (there is a doc: docs.google.com/document/d/1PNGSn_d0A7gTR4C0p6geQyHOTgdpitKCRvafCNnT-44/edit)

  • @sanity_equals_nil
    @sanity_equals_nil 2 หลายเดือนก่อน

    Would be interesting to listen about how caching is implemented in postgres.

    • @PostgresTV
      @PostgresTV 2 หลายเดือนก่อน

      good topic - included to the list of ideas docs.google.com/document/d/1PNGSn_d0A7gTR4C0p6geQyHOTgdpitKCRvafCNnT-44/edit#

  • @maudrid
    @maudrid 2 หลายเดือนก่อน

    You mentioned some pitfalls with trigram. Do you have links to any media that goes into more detail?

    • @NikolaySamokhvalov
      @NikolaySamokhvalov 2 หลายเดือนก่อน

      Well, the bottom of the docs for pg_trgm already give an idea that things are not easy and require significant effort. a) too low level (cannot be used, for example, with full text search to have fast correction of typos without creation an additional table and a dance around it); b) under heavy loads, for large volumes, GIN fastupdate, pending lists - this will become harder and harder to tune to avoid performance issues (same thing as for any other GIN indexes in general) So these days, I would now perhaps consider some fast LLM for proper typo corrections.

    • @PostgresTV
      @PostgresTV 2 หลายเดือนก่อน

      also, what the bot says about it: postgres.ai/chats/018e9250-abff-73fd-af40-1b06ad17919d // Nik

  • @obacht7
    @obacht7 2 หลายเดือนก่อน

    Quite philosophical this time. Reminds me of "free as in freedom" vs. "free as in free beer". I will add "you only own what you can destroy" to my list of quotes worth remembering 👍 For me, the podcast is perfect for listening without video. I enjoy every episode!

  • @obacht7
    @obacht7 2 หลายเดือนก่อน

    I like the analogy of going to the doctor. It makes me think about the health of some people vs. the health of the systems they build 😁

  • @DavidTuron1
    @DavidTuron1 3 หลายเดือนก่อน

    Thanks for podcast. pgBadger is my favorite tool for many years. Very good tip with setting log_min_duration statement to zero for some sort period. I read about the sampling setting but not try jet. And many thanks for songs❤ They are better than original🙂

    • @anithag6214
      @anithag6214 20 วันที่ผ่านมา

      how to read pgbadger

  • @DavidTuron1
    @DavidTuron1 3 หลายเดือนก่อน

    Hi, thanks for the podcast and many useful links. I usually use depesz tool, but i will try yours as well:) I have one tip of maybe strange use explain verbose - sometimes i want to have insert with columns definition, so i use EXPLAIN VERBOSE SELECT * FROM table and just copy column names from output:) I now there are other ways to do that - like pg_dump with --column-inserts or use some GUI tool for generating insert o just get columns from some create table def. or \gdesc but with some painful editing:) Thanks again and have nice day and fast queries.

  • @maudrid
    @maudrid 3 หลายเดือนก่อน

    I think that there's a flaw in how postgresql treats superuser. Some things only super user can do. Why not allow me to assign permission to a user that I want to allow to refresh a subscription for example. Now this user has to be a superuser. I've had to write functions that are just wrappers do specific things with execution rights of the superuser.

  • @jianhe5119
    @jianhe5119 3 หลายเดือนก่อน

    🎉

  • @patrick99e99
    @patrick99e99 3 หลายเดือนก่อน

    Just bought his book!

    • @andatki
      @andatki 3 หลายเดือนก่อน

      Thanks so much!

  • @Drgnslyr123
    @Drgnslyr123 3 หลายเดือนก่อน

    It's easier to make changes as a dev when you don't have to reverse walk the migrations to grab the latest source of truth. What I do is store all functions, tables, triggers, etc in separate files, then I have another file that determines the order and structure. It runs this into something called a shadow DB then we diff it with your live dev DB to generate migrations.

    • @andatki
      @andatki 3 หลายเดือนก่อน

      Is this available as open source code? I am curious about the idea of a shadow DB and whether that makes the DX of schema evolution faster or easier. One practical limitation I've experienced is that making any schema changes requires having the full application environment installed and configured, and this tight coupling feels unnecessary in some scenarios.

  • @pycontiki
    @pycontiki 3 หลายเดือนก่อน

    Does Andy know Obie?

  • @pycontiki
    @pycontiki 3 หลายเดือนก่อน

    Rails? Nobody uses that 2007 technology anymore. Django & PostgreSQL is heaven ❤

    • @NikolaySamokhvalov
      @NikolaySamokhvalov 3 หลายเดือนก่อน

      Well every time you commit code to GitHub or GitLab, guess what is being used;)

    • @michristofides
      @michristofides 3 หลายเดือนก่อน

      Haha who should we invite on to discuss Django + PostgreSQL?

    • @pycontiki
      @pycontiki 3 หลายเดือนก่อน

      @@NikolaySamokhvalovhaven’t both those sites suffered large hacks and database problems? 🤣🙄 I know many people at GH, all good.

    • @andatki
      @andatki 3 หลายเดือนก่อน

      @@michristofides Haki Benita could be a great guest to discuss Django and Rails!

    • @andatki
      @andatki 3 หลายเดือนก่อน

      Interestingly, the Python language is even older than Ruby (1991 vs. 1995) and the Rails framework came out a bit before Django, around 2004 or 2005. Do you know of some things in Django for PostgreSQL that you prefer to what Rails offers? Always curious to see what things look like in other frameworks.

  • @ivanstanevich
    @ivanstanevich 3 หลายเดือนก่อน

    Thank you for running this podcast, lots of valuable knowledge in every episode!

  • @mbanck
    @mbanck 3 หลายเดือนก่อน

    Current versions of hypopg an also mask an index, for the "would it pick my index if the other one does not exist?" question

  • @GabrieGliukaz
    @GabrieGliukaz 3 หลายเดือนก่อน

    Thank you for the episode. I was wandering if there is documented AWS RDS default configuration somewhere? I failed to find any. In particular I'm interested in autovacuum settings.

  • @kirkwolak6735
    @kirkwolak6735 3 หลายเดือนก่อน

    We noticed some of our most important queries in PG16 had improved performance!

  • @ilyaportnov181
    @ilyaportnov181 3 หลายเดือนก่อน

    a couple of reasons I think deserve mentioning in this context: * there are different operator families, and they support different operators. For example, default btree index on text field does not support `like` operator; you have to do either `collate "C"`, or text_pattern_ops; on the other hand, text_pattern_ops does not support inequaltiy comparation (</>) and sorting. * there are different collations; if your index is, for example, `collate "C"`, but you do comparasion by equality with default collation, the index will not work - you have to specify collation in the query explicitly or rebuild the index with another collation. * and, talking about selectivity / cardinality, there is a more difficult type of problems, when PG can not correctly calculate cardinality because of several joins: it can calculate cardinality of join result when you join two tables, but then when you join the result of join with the third table, it will probably not be able to calculate cardinality correctly. In this case I don't know a simple way to fix such problem, apart of rewriting one query into several or using materailized views or smth like that. Because of cardinality miscalculation, PG can select totally wrong sequence of joins, and because of that it will not use index... You can try to force the order of joins by use CTEs with `materialized` keyword to make an optimization barrier. Or even switch to Max Boguk's hardcore techniques with recursive CTEs :)

  • @agarbanzo360
    @agarbanzo360 3 หลายเดือนก่อน

    Why doesn’t Postgres do some detection of the disk type and do basic, deterministic self tuning?

    • @NikolaySamokhvalov
      @NikolaySamokhvalov 3 หลายเดือนก่อน

      Good question. It even has no idea how many CPU cores and GiB of RAM are available. I think there is potential for some tuning module to be developed - and TimescaleDB has it, for example (and many of its things can be applied to non-timescale setups)

    • @agarbanzo360
      @agarbanzo360 3 หลายเดือนก่อน

      Didn’t even think of that. Something super simple like worker_mem = parameter * memory available, etc would be a huge improvement

  • @marcinbadtke
    @marcinbadtke 3 หลายเดือนก่อน

    Thank you for the conversation. It is hard to imaging for me that disk performance is the main reason database engine chooses to use index or not. As far as I know during sequential scan many database blocks are read in one IO operation. On the other hand random read reads only one database block. In my opinion using index or not is decided based primarily on statistics. Index is not used when cost calculation based on statistics shows that not using index is optimal. E.g. statistics show that amount of data a query tries to get is so big that it is cheaper to do sequential scan.

    • @PostgresTV
      @PostgresTV 3 หลายเดือนก่อน

      Thanks. Good question. I know, it might be counter-intuitive, but it is as it is - I see it quite often (ofc, not for trivial single-row PK lookups). Detailed answer: twitter.com/samokhvalov/status/1761082969001972050 // Nikolay

    • @marcinbadtke
      @marcinbadtke 3 หลายเดือนก่อน

      @@PostgresTV thank you

  • @wstrzalka
    @wstrzalka 3 หลายเดือนก่อน

    It's still 4 on RDS. And when raised to their support the answers was it's not related to hardware and I should set it myself to whatever I want :)

    • @PostgresTV
      @PostgresTV 3 หลายเดือนก่อน

      🤷

  • @Sam-cp6so
    @Sam-cp6so 3 หลายเดือนก่อน

    Because there’s a better index or it’s not done building or you need to run vacuum analyze, so many reasons it won’t use my friggin index

  • @rosendo3219
    @rosendo3219 4 หลายเดือนก่อน

    oh yeah, that fat sip of nice and cold beer before you start :)

    • @NikolaySamokhvalov
      @NikolaySamokhvalov 3 หลายเดือนก่อน

      It was redbull Not into beer really, but I like the idea -- maybe we should do some drinking late night online Postgres event (if Michael is drinking at all, idk)