Postgres FM

Gapless sequences


Listen Later

Nik and Michael discuss the concept of gapless sequences — when you might want one, why sequences in Postgres can have gaps, and an idea or two if you do want them.

And one quick clarification: changing the CACHE option in CREATE SEQUENCE can lead to even more gaps, the docs mention it explicitly.
 
Here are some links to things they mentioned:

  • CREATE SEQUENCE https://www.postgresql.org/docs/current/sql-createsequence.html
  • Sequence Manipulation Functions https://www.postgresql.org/docs/current/functions-sequence.html
  • One, Two, Skip a Few (post by Pete Hamilton from Incident io) https://incident.io/blog/one-two-skip-a-few
  • Postgres sequences can commit out-of-order (blog post by Anthony Accomazzo / Sequin) https://blog.sequinstream.com/postgres-sequences-can-commit-out-of-order
  • Logical Replication of sequences (hackers thread) https://www.postgresql.org/message-id/flat/CAA4eK1LC%2BKJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ%40mail.gmail.com
  • Synchronization of sequences to subscriber (patch entry in commitfest) https://commitfest.postgresql.org/patch/5111/
  • Get or Create (episode with Haki Benita) https://postgres.fm/episodes/get-or-create
  • German tank problem https://en.wikipedia.org/wiki/German_tank_problem


~~~

What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc!


~~~

Postgres FM is produced by:

  • Michael Christofides, founder of pgMustard
  • Nikolay Samokhvalov, founder of Postgres.ai


With credit to:

  • Jessie Draws for the elephant artwork
...more
View all episodesView all episodes
Download on the App Store

Postgres FMBy Nikolay Samokhvalov and Michael Christofides

  • 4.7
  • 4.7
  • 4.7
  • 4.7
  • 4.7

4.7

21 ratings


More shows like Postgres FM

View all
Acquired by Ben Gilbert and David Rosenthal

Acquired

4,616 Listeners

Software Engineering Radio by se-radio@computer.org

Software Engineering Radio

271 Listeners

The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

288 Listeners

a16z Podcast by Andreessen Horowitz

a16z Podcast

1,094 Listeners

Software Engineering Daily by Software Engineering Daily

Software Engineering Daily

624 Listeners

Talk Python To Me by Michael Kennedy

Talk Python To Me

583 Listeners

Thoughtworks Technology Podcast by Thoughtworks

Thoughtworks Technology Podcast

42 Listeners

Python Bytes by Michael Kennedy and Brian Okken

Python Bytes

214 Listeners

Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

Syntax - Tasty Web Development Treats

986 Listeners

CoRecursive: Coding Stories by Adam Gordon Bell - Software Developer

CoRecursive: Coding Stories

190 Listeners

Scaling Postgres by Creston Jamison

Scaling Postgres

12 Listeners

The Stack Overflow Podcast by The Stack Overflow Podcast

The Stack Overflow Podcast

63 Listeners

The Real Python Podcast by Real Python

The Real Python Podcast

143 Listeners

Oxide and Friends by Oxide Computer Company

Oxide and Friends

63 Listeners

The Pragmatic Engineer by Gergely Orosz

The Pragmatic Engineer

64 Listeners