Рет қаралды 489
[ 🇬🇧_🇺🇸 Check out the subtitles - we now edit them, ChatGPT+manually! You can also try KZfaq's auto-translation of them from English to your language; try it and share it with people interested in Postgres!]
Nikolay and Michael discuss foreign keys in Postgres - what they are, their benefits, their overhead, some edge cases to be aware of, some improvements coming, and whether or not they generally recommend using them.
Here are some links to things they mentioned:
* Foreign keys (docs) www.postgresql.org/docs/curre...
* Our episode about constraints: postgres.fm/episodes/constraints
* GitLab migration helper add_concurrent_foreign_key github.com/gitlabhq/gitlabhq/...
* Adding a foreign key without downtime (tweet by Nikolay) x.com/samokhvalov/status/1732...
* Bloat, pg_repack, and deferred constraints (blog post by Miro) / postgresql-bloat-pg-re...
* Postgres 17 draft release notes, server configuration section www.postgresql.org/docs/17/re...
* Our 100th episode postgres.fm/episodes/to-100tb...
* Stop! Trigger Time (blog post by Michael) www.pgmustard.com/blog/trigge...
* Should I Create an Index on Foreign Keys? (Blog post by Percona) www.percona.com/blog/should-i...
* Avoid Postgres performance cliffs with MultiXact IDs and foreign keys (5 min video by Lukas Fittl) pganalyze.com/blog/5mins-post...
* Experiment to see basic overhead of foreign keys v2.postgres.ai/chats/01902ee6...
* Experiment showing an extreme contention case v2.postgres.ai/chats/018fb28d...
* Subtransactions Considered Harmful (blog post by Nikolay) postgres.ai/blog/20210831-pos...
* Notes on some PostgreSQL implementation details (blog post by Nelson Elhage that mentions “subtransactions are cursed”) buttondown.email/nelhage/arch...
~~~
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 brought to you 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 the transcript, guest profiles, and more.