---
title: "Comment by Mario Fang on \"PostgreSQL Point-in-Time Recovery: A Production Architecture Guide\" | Hashnode"
description: "The \"archive command that returns 0 when the upload fails\" is the one that got me — a pipeline without pipefail reported success for weeks while nothing was act"
url: "https://hashnode.com/posts/postgresql-point-in-time-recovery-a-production-architecture-guide/6af893c14aebfdfe7ae319f6/comment/6af92c5dc9fd5126502acebd"
---

[Discussion](https://hashnode.com/posts/postgresql-point-in-time-recovery-a-production-architecture-guide/6af893c14aebfdfe7ae319f6)

Comment [PostgreSQL Point-in-Time Recovery: A Production Architecture Guide](https://hashnode.com/posts/postgresql-point-in-time-recovery-a-production-architecture-guide/6af893c14aebfdfe7ae319f6)

[Mario Fang](https://hashnode.com/@mariosfong)

[23h ago](https://hashnode.com/posts/postgresql-point-in-time-recovery-a-production-architecture-guide/6af893c14aebfdfe7ae319f6/comment/6af92c5dc9fd5126502acebd)

The "archive command that returns 0 when the upload fails" is the one that got me — a pipeline without pipefail reported success for weeks while nothing was actually landing in the archive. I found out during a restore test, not during an incident, and that is the only reason it became a funny story instead of a bad one. Your point about restoring to a new instance instead of overwriting the damaged primary is the other half of the same habit: the restore you practice is the restore you get.

[Daniel Cruz](https://hashnode.com/@danielcruznet)

[6h ago](https://hashnode.com/posts/postgresql-point-in-time-recovery-a-production-architecture-guide/6af893c14aebfdfe7ae319f6/comment/6af92c5dc9fd5126502acebd#reply-6afa1eb7708ea76c568882c7)

That’s exactly the failure the archive section is meant to catch: everything reports green while nothing is actually landing. Finding it in a restore test instead of an incident is the best possible version of that story. It’s also why the post doesn’t treat a zero exit code as proof. It alerts when pg\_stat\_archiver shows last\_failed\_time newer than last\_archived\_time, and the scheduled restore test checks real data, not just that the server starts. And yes, the restore you practice is the restore you get. Thanks for sharing it.
