Should we use foreign keys? | Postgres.FM 102 |

Описание к видео Should we use foreign keys? | Postgres.FM 102 |

[ 🇬🇧_🇺🇸 Check out the subtitles – we now edit them, ChatGPT+manually! You can also try YouTube'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) https://www.postgresql.org/docs/curre...
Our episode about constraints: https://postgres.fm/episodes/constraints
GitLab migration helper add_concurrent_foreign_key https://github.com/gitlabhq/gitlabhq/...
Adding a foreign key without downtime (tweet by Nikolay) https://x.com/samokhvalov/status/1732...
Bloat, pg_repack, and deferred constraints (blog post by Miro)   / postgresql-bloat-pg-repack-and-deferred-co...  
Postgres 17 draft release notes, server configuration section https://www.postgresql.org/docs/17/re...
Our 100th episode https://postgres.fm/episodes/to-100tb...
Stop! Trigger Time (blog post by Michael) https://www.pgmustard.com/blog/trigge...
Should I Create an Index on Foreign Keys? (Blog post by Percona) https://www.percona.com/blog/should-i...
Avoid Postgres performance cliffs with MultiXact IDs and foreign keys (5 min video by Lukas Fittl) https://pganalyze.com/blog/5mins-post...
Experiment to see basic overhead of foreign keys https://v2.postgres.ai/chats/01902ee6...
Experiment showing an extreme contention case https://v2.postgres.ai/chats/018fb28d...
Subtransactions Considered Harmful (blog post by Nikolay) https://postgres.ai/blog/20210831-pos...
Notes on some PostgreSQL implementation details (blog post by Nelson Elhage that mentions “subtransactions are cursed”) https://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 https://postgres.ai/
Michael Christofides, founder of pgMustard https://pgmustard.com/


~~~


This is the video version. Check out https://postgres.fm to subscribe to the audio-only version, to see the transcript, guest profiles, and more.

Комментарии

Информация по комментариям в разработке