3 comments

  • aurareturn 8 minutes ago
    Trying to recoup space at a slow period, I remember using Repack on New Years Eve on my local computer for a multi TB production DB and waiting hours and hours hoping my connection doesn’t drop. When it dropped, I had to restart all over again.

    Holy hell it was a miserable experience and it ruined my New Years Eve.

    I’m so happy this is now built in.

    • lefra 4 minutes ago
      Before long-running commands, open a screen [1] session. That way, if you get disconnected, the job keeps running, and you can reconnect to the screen session afterwards.

      The man page is quite long, use "screen -R <appropriate name" to create the session or reconnect to it, and (IIRC) CTRL-A D to exit screen without closing the session.

      [1] https://man7.org/linux/man-pages/man1/screen.1.html

    • craigkerstiens 5 minutes ago
      I feel like that whole experience deserves a blog post.

      pg_repack, pg_squeeze, pg_reorg, all felt like it was "use as directed" and if you misuse them we're sorry if we corrupt data - that's a little extreme but they were still very advanced tools.

      Having this in core and learning from all the previous Postgres paths is the way of Postgres. I'm with you couldn't be more excited to have this in core, to me it was always the flagship feature and I'm just glad it stayed in 19 vs. a revert compared to so many other flagship features.

  • jzelinskie 44 minutes ago
    I haven't used these extensions, but I like the direction of being able to extend Postgres by tailing its own internals (pg_squeeze approach) than triggers (pg_repack).

    We (the SpiceDB developers) took a similar approach to solve a different problem a few years ago: implementing strict serializability in Postgres[0]. By hooking into the transactions layer themselves (pg_xact), we could layer on our own MVCC reusing the real Postgres transactions to compute visibility and total ordering. When you can just tail the Postgres internals, you don't even need to implement a Postgres extension, which can keep it portable across locked-down, managed Postgres offerings.

    Do folks know of other clever implementations of behavior by "spying" on the Postgres internals?

    [0]: https://m.youtube.com/watch?v=_f6fHy4DWWM

  • adilbasari 15 minutes ago
    [flagged]