<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/100-000-lines-of-c-later-pgsafe-at-pgday-uk-2026-fzopvxm6x" -->

---
title: 100,000 Lines of C Later: pgSafe at PGDay UK 2026
description: A talk recap from PGDay UK 2026 detailing pgSafe, a from-scratch Go rewrite of enterprise Postgres backup tooling, built in response to pgBackRest's brief loss...
canonical: https://daily.dev/posts/100-000-lines-of-c-later-pgsafe-at-pgday-uk-2026-fzopvxm6x
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 100,000 Lines of C Later: pgSafe at PGDay UK 2026 | daily.dev
og:description: A talk recap from PGDay UK 2026 detailing pgSafe, a from-scratch Go rewrite of enterprise Postgres backup tooling, built in response to pgBackRest's brief loss...
og:url: https://daily.dev/posts/100-000-lines-of-c-later-pgsafe-at-pgday-uk-2026-fzopvxm6x
og:image: https://api.daily.dev/og/posts/FzOpVxM6X.png
og:image:alt: 100,000 Lines of C Later: pgSafe at PGDay UK 2026
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 100,000 Lines of C Later: pgSafe at PGDay UK 2026

**[Planet PostgreSQL](https://daily.dev/sources/planet-postgresql)** · 15 min read · 4 upvotes · 0 comments

## Summary

A talk recap from PGDay UK 2026 detailing pgSafe, a from-scratch Go rewrite of enterprise Postgres backup tooling, built in response to pgBackRest's brief loss of corporate backing in April 2026. The author walks through the core responsibilities of a Postgres backup tool, ten hard-won invariants around ordering and durability, three design tenets (Postgres never knows pgSafe exists, standards/libraries first, no credentials on the database host), and three operating modes. A detailed breakdown shows over half of pgBackRest's 96,000 lines of C are language-level infrastructure (HTTP, TLS, JSON, request signing) that Go's standard library and cloud SDKs eliminate, shrinking the equivalent Go implementation to roughly 18,000 lines. pgSafe is alpha-quality, not production-ready, with a documented gaps list including synchronous-only WAL archiving and unencrypted WAL at rest.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://postgr.es/p/9ub>

## Questions this post answers

### What happened to pgBackRest in April 2026?

pgBackRest lost its corporate backing and its maintainer archived the GitHub repository. A few weeks later the project turned out to be sustainable again and returned to active maintenance. During that gap, users were left without a clear answer to what enterprise Postgres backup tool to rely on, since pgBackRest is one of only two de facto standard options.

_Teams choosing a Postgres backup strategy can track how tooling risk and continuity play out on daily.dev._

### How much of pgBackRest's C codebase is actual backup logic versus infrastructure?

Roughly half. Of about 96,000 lines of C, only around 45,000 lines handle actual backup logic; the rest (about 51,000 lines) implements things like an HTTP/TLS/socket layer, hand-written S3/Azure/GCS request signing, JSON/XML/string/list utilities, memory contexts, and a generated config system - infrastructure that Go's standard library, generics, and cloud SDKs provide out of the box.

_Engineers weighing a language rewrite for legacy infrastructure follow this kind of cost breakdown on daily.dev._

### What are the operating modes for connecting a Postgres backup tool to a database host?

pgSafe supports three modes: simple (a single pg_basebackup replication connection), remote-parallel (multiple connections calling pg_read_binary_file with client-side page checksum validation), and pgSafe worker mode, where a worker process on the database host reads the data directory directly and streams bytes to storage without passing through the caller. Mode is inferred automatically from configuration rather than set with a flag.

_Developers designing backup architectures for scoped credentials and minimal database exposure can follow this design on daily.dev._

## Similar posts on daily.dev

- [Philosophy behind pg\_hardstorage](https://daily.dev/posts/philosophy-behind-pg-hardstorage-cjpow1tkd) · CYBERTEC PostgreSQL · 6 upvotes · 0 comments
- [PGConf.EU 2026 MEGAPOST: a busy week in Valencia](https://daily.dev/posts/pgconf-eu-2026-megapost-a-busy-week-in-valencia-4dqlqk3ph) · Planet PostgreSQL · 0 upvotes · 0 comments
- [Google Cloud: Investing in the future of PostgreSQL](https://daily.dev/posts/google-cloud-investing-in-the-future-of-postgresql-cvmyfib5h) · Google Open Source Blog · 36 upvotes · 1 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#golang](https://daily.dev/tags/golang), [#postgresql](https://daily.dev/tags/postgresql)

[View this post on daily.dev](https://daily.dev/posts/100-000-lines-of-c-later-pgsafe-at-pgday-uk-2026-fzopvxm6x)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"100,000 Lines of C Later: pgSafe at PGDay UK 2026","url":"https://daily.dev/posts/100-000-lines-of-c-later-pgsafe-at-pgday-uk-2026-fzopvxm6x","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/100-000-lines-of-c-later-pgsafe-at-pgday-uk-2026-fzopvxm6x"},"datePublished":"2026-09-09T17:02:23.021Z","dateModified":"2026-09-13T18:36:24.862Z","description":"A talk recap from PGDay UK 2026 detailing pgSafe, a from-scratch Go rewrite of enterprise Postgres backup tooling, built in response to pgBackRest's brief loss...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/18bb8b38495dfde7695f8196927314a3?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/18bb8b38495dfde7695f8196927314a3?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Planet PostgreSQL","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Planet PostgreSQL","logo":"https://media.daily.dev/image/upload/logos/placeholder.jpg","url":"https://daily.dev/sources/planet-postgresql"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/100-000-lines-of-c-later-pgsafe-at-pgday-uk-2026-fzopvxm6x","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,golang,postgresql","timeRequired":"PT15M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Planet PostgreSQL","item":"https://daily.dev/sources/planet-postgresql"},{"@type":"ListItem","position":3,"name":"100,000 Lines of C Later: pgSafe at PGDay UK 2026"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/100-000-lines-of-c-later-pgsafe-at-pgday-uk-2026-fzopvxm6x#faq","mainEntity":[{"@type":"Question","name":"What happened to pgBackRest in April 2026?","acceptedAnswer":{"@type":"Answer","text":"pgBackRest lost its corporate backing and its maintainer archived the GitHub repository. A few weeks later the project turned out to be sustainable again and returned to active maintenance. During that gap, users were left without a clear answer to what enterprise Postgres backup tool to rely on, since pgBackRest is one of only two de facto standard options. Teams choosing a Postgres backup strategy can track how tooling risk and continuity play out on daily.dev."}},{"@type":"Question","name":"How much of pgBackRest's C codebase is actual backup logic versus infrastructure?","acceptedAnswer":{"@type":"Answer","text":"Roughly half. Of about 96,000 lines of C, only around 45,000 lines handle actual backup logic; the rest (about 51,000 lines) implements things like an HTTP/TLS/socket layer, hand-written S3/Azure/GCS request signing, JSON/XML/string/list utilities, memory contexts, and a generated config system - infrastructure that Go's standard library, generics, and cloud SDKs provide out of the box. Engineers weighing a language rewrite for legacy infrastructure follow this kind of cost breakdown on daily.dev."}},{"@type":"Question","name":"What are the operating modes for connecting a Postgres backup tool to a database host?","acceptedAnswer":{"@type":"Answer","text":"pgSafe supports three modes: simple (a single pg_basebackup replication connection), remote-parallel (multiple connections calling pg_read_binary_file with client-side page checksum validation), and pgSafe worker mode, where a worker process on the database host reads the data directory directly and streams bytes to storage without passing through the caller. Mode is inferred automatically from configuration rather than set with a flag. Developers designing backup architectures for scoped credentials and minimal database exposure can follow this design on daily.dev."}}]}
```

