Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    R

    Rob Conery

    rob.conery.io · Personal blog · on HN since 2015

    Rob Conery writes about PostgreSQL, Node.js, and .NET development, and is the author of The Imposter's Handbook.

    Visit blogHN submissions
    DatabasesProgramming
    What HN says

    HN commenters list him among developer blogs, link his Postgres id generator, and note his correction to a RethinkDB performance claim.

    Stats for nerds
    50HN people shared it
    57linked in comments
    1.7Kstory points
    Dec 2019last shared
    2015people per year2019

    Top posts on HN

    1. 1
      RethinkDB 2.0 is amazing
      2 people · 348 points · first shared 2015 · 203 comments on HN
    2. 2
      Embracing SQL in Postgres
      1 person · 273 points · first shared 2015 · 120 comments on HN
    3. 3
      Mod and remainder are not the same
      3 people · 168 points · first shared 2018 · 48 comments on HN
    4. 4
      WTF Is Big O Notation?
      1 person · 143 points · first shared 2019 · 96 comments on HN
    5. 5
      The Logical Disaster of Null
      1 person · 115 points · first shared 2018 · 287 comments on HN
    6. 6
      Document Storage Gymnastics with Postgres
      1 person · 107 points · first shared 2015 · 49 comments on HN
    7. 7
      Setting Up a Fast, Comprehensive Search Routine with PostgreSQL
      1 person · 99 points · first shared 2018 · 49 comments on HN
    8. 8
      Staying Hungry, Staying Foolish
      1 person · 99 points · first shared 2015 · 29 comments on HN
    9. 9
      PostgreSQL for Those Who Can’t Even
      1 person · 60 points · first shared 2020 · 4 comments on HN
    10. 10
      Fine tuning full text search with PostgreSQL 12
      2 people · 45 points · first shared 2019 · 2 comments on HN

    What HN people wrote when they linked it

    • bjtJun 2017

      > In what context would a primary key change, even when sharding?

      The only time I've seen that happen is when a DBA evangelized for just using 'natural' keys, which in this case were slugs based on the item name. The problem came when users decided they wanted to rename things and then wondered why the IDs they were seeing in URLs didn't match the new names.

      I'm not a believer in natural keys anymore.

      > If you need sorting in your table, provide some kind of indexed timestamp.

      A v4 UUID contains a timestamp. So it seems a bit wasteful to add the separate timestamp column. Why not just use the timestamp built into the ID? This is what MongoDB's internally-generated IDs do. (Though they're not quite UUIDs.)

      There's a catch with v4 UUIDs though: the timestamp portion of the ID is not the most significant digits, so a simple ORDER BY doesn't do what you want.

      I like the solution developed by Instagram, which Rob Conery discusses at the link below. It uses a pretty simple plpgsql function to generate a 64 bit integer based on the current time, a shard ID, and a per-shard sequence. This lets you generate 1024 IDs per second per shard. It also puts the timestamp portion of the ID first, so if all the shards' data ends up in Hadoop or something you can order consistently across the whole set.

      http://rob.conery.io/2014/05/29/a-better-id-generator-for-postgresql/

    • barkingdogJun 2016

      Hmm, going to say a hard no on naively preferring UUIDs. It's a little bit of extra work to go with the instagram style approach [0] of using many logical postgres shards with a custom id function that implements twitter snowflake style IDs, but it's an elegant, scalable and operationally simple solution. I am very fond of it.

      [0] http://rob.conery.io/2014/05/29/a-better-id-generator-for-postgresql/

    • sotojuanNov 2015

      Well, the easy answer is to stop volunteering and attending family/social events[1]. Check out this[2] blog post for other possible ideas.

      [1] Number 3 here: http://www.aaronsw.com/weblog/morebooks

      [2] http://rob.conery.io/2015/10/06/how-to-learn-a-new-programming-language-while-maintaining-your-day-job-and-still-being-there-for-your-family/

    • pcmaffeyDec 2019

      For something a little more practical, I recently came across this postgres id generator[1], which Ive been playing around with as a solution for ordered, scalable bigint ids (that take up less space than standard uuids).

      [1] https://rob.conery.io/2014/05/28/a-better-id-generator-for-postgresql/

    • intellectableOct 2015

      24:08 Minutes in

      https://github.com/robconery/pg_docs_api

      references:

      http://rob.conery.io/2015/08/20/designing-a-postgresql-document-api/

      related:

      http://rob.conery.io/2015/03/13/bringing-the-power-of-postgres-to-nodejs/

      https://github.com/robconery/massive-js

    • DowwieOct 2017

      Why not use Twitter's snowflake id? Instagram blogged about a Postgres function that generates them

      http://rob.conery.io/2014/05/28/a-better-id-generator-for-postgresql/

    Related

    Big Machinebigmachine.io44 people

    A Curious Moon

    Big Machine
    Company · last shared 2026
    Craig Kerstienscraigkerstiens.com101 people

    Give Me Back My Monolith

    Craig Kerstiens
    Personal · last shared 2025
    Aphyraphyr.com551 people

    Hexing the technical interview (2017)

    Aphyr
    Personal · last shared 2026
    Damien Katzdamienkatz.net71 people

    The Unreasonable Effectiveness of C

    Damien Katz
    Personal · last shared 2020
    Jepsenjepsen.io212 people

    Jepsen: PostgreSQL 12.3

    Jepsen
    Company · last shared 2026
    Code of Robcodeofrob.com35 people

    You have ruined JavaScript

    Code of Rob
    Personal · last shared 2022
    Unlimited Noveltyunlimitednovelty.com42 people

    Node.js has jumped the shark

    Unlimited Novelty
    Personal · last shared 2023
    Timescale Blogblog.timescale.com95 people

    How percentile approximation works and why it's more useful than averages

    Timescale Blog
    Company · last shared 2022