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
    P

    Peter Geoghegan

    pgeoghegan.blogspot.com · Personal blog · on HN since 2011

    Peter Geoghegan, a PostgreSQL contributor, writes about database internals such as sorting, index bloat, JSONB, and building Postgres with Clang.

    Visit blogHN submissions
    DatabasesSystems & Performance
    What HN says

    HN links it for PostgreSQL performance details. Commenters cite his posts on faster sorting with abbreviated keys in 9.5, Clang builds, and JSONB.

    Stats for nerds
    17HN people shared it
    16linked in comments
    242story points
    Jan 2018last shared
    2011people per year2018

    Top posts on HN

    1. 1
      Clang now builds Postgres without additional warnings
      1 person · 94 points · first shared 2011 · 19 comments on HN
    2. 2
      Sorting of integers and floats 23% faster in PostgreSQL 9.2 (long explanation)
      1 person · 69 points · first shared 2012 · 8 comments on HN
    3. 3
      Sorting improvements in PostgreSQL 9.2: the case for micro-optimisation
      1 person · 41 points · first shared 2012 · 4 comments on HN
    4. 4
      PostgreSQL Index bloat under a microscope
      4 people · 10 points · first shared 2017 · Discussion on HN
    5. 5
      PostgreSQL corruption detection tool detects “freeze-the-dead” bug
      1 person · 10 points · first shared 2017 · Discussion on HN
    6. 6
      What I Think of Jsonb
      1 person · 6 points · first shared 2014 · Discussion on HN
    7. 7
      Exploiting locality to improve PostgreSQL's text sort performance
      3 people · 3 points · first shared 2015 · Discussion on HN
    8. 8
      Visualizing a column's space overhead using pg_hexedit
      1 person · 2 points · first shared 2018 · Discussion on HN
    9. 9
      Pg_hexedit: Rich hex editor annotations for Postgres relfiles
      1 person · 2 points · first shared 2017 · Discussion on HN
    10. 10
      pg_hexedit now supports GiST, GIN, and hash indexes
      1 person · 2 points · first shared 2017 · Discussion on HN

    What HN people wrote when they linked it

    • twotwotwoDec 2015

      A possibly counterintuitive case where "the key...is expensive to compute" can be when accessing the key just requires following a pointer to something not in cache. It's not the same thing syntactically, but, for example, Postgres sped up collation by packing bytes into integers:

      http://pgeoghegan.blogspot.com/2015/01/abbreviated-keys-exploiting-locality-to.html

      I've also seen speedups sorting strings by first sorting prefixes of them packed into uint64s (rather than sorting pointer/length references to string data), and in an application where a friend needed to sort a lot of indices into an array, it turned out to greatly speed the sort (by avoiding indirections) to copy the whole array, sort the indices and the copy of the array together, then toss out the copy.

    • petergeogheganMay 2015

      Sorting will be a lot faster on PostgreSQL 9.5:

      http://pgeoghegan.blogspot.com/2015/01/abbreviated-keys-exploiting-locality-to.html

      http://pgeoghegan.blogspot.com/2015/04/abbreviated-keys-for-numeric-to.html

      I wonder whether and to what extent Vitesse benefits from using this technique, which is fairly well known (e.g. it appears in a 1994 paper by Gray -- Alphasort).

      As I go into in the second link there, someone reported an order of magnitude increase in sort performance in one case.

      For what it's worth, I doubt that this fully accounts for why Vitesse is faster. I don't know that I'd trust my data to it, but I don't think it's snake oil, even if some of the figures shown are arguably a bit misleading.

    • wulczerAug 2011

      Right now it's more useful for uncovering bugs, I don't think anyone would recommend running Postgres compiled with clang on a production system.

      For more info about performance, see http://pgeoghegan.blogspot.com/2011/07/could-clang-displace-gcc-generally-part.html

    • risJan 2018

      For even more detail, https://github.com/petergeoghegan/pg_hexedit

      With further blog posts https://pgeoghegan.blogspot.co.uk/2017/11/pghexedit-rich-hex-editor-annotations.html and http://pgeoghegan.blogspot.co.uk/2018/01/exploring-sp-gist-and-brin-indexes.html

    • selenamarieAug 2012

      Peter is awesome and is also primarily responsible for a bunch of power consumption improvements: http://pgeoghegan.blogspot.com/2012/01/power-consumption-in-postgres-92.html

    • sendobApr 2013

      http://pgeoghegan.blogspot.com/2012/06/towards-14000-write-transactions-on-my.html may interest you

    Related

    2ndQuadrant Blogblog.2ndquadrant.com99 people

    Data Loss at GitLab

    2ndQuadrant Blog
    Company · last shared 2025
    Small Datumsmalldatum.blogspot.com63 people

    The original LSM paper

    Small Datum
    Personal · last shared 2026
    Robert Haasrhaas.blogspot.com96 people

    New Features Coming in PostgreSQL 10

    Robert Haas
    Personal · last shared 2026
    Josh Berkusdatabasesoup.com39 people

    Of Booze and Brogrammers

    Josh Berkus
    Personal · last shared 2019
    Peter Eisentrautpeter.eisentraut.org30 people

    How about trailing commas in SQL?

    Peter Eisentraut
    Personal · last shared 2026
    Percona Blogpercona.com327 people

    UUIDs are popular, but bad for performance (2019)

    Percona Blog
    Company · last shared 2026
    Christophe Pettusthebuild.com53 people

    Securing PostgreSQL [pdf]

    Christophe Pettus
    Personal · last shared 2026
    Jepsenjepsen.io212 people

    Jepsen: PostgreSQL 12.3

    Jepsen
    Company · last shared 2026