fix(vector): publish backups without replacement

This commit is contained in:
2026-07-12 02:32:32 +02:00
parent 015c496bda
commit 407c4a6faf
3 changed files with 30 additions and 1 deletions
@@ -83,3 +83,12 @@ All five final review findings were addressed in a follow-up commit:
sequence authority, and 768-dimensional compatibility are therefore verified through the
production adapter. Reconciliation now restores group-role schema `USAGE`, which table-selected
archives cannot carry.
### Atomic no-replace backup publication
The final publication review is also closed. The private same-directory archive is published with
an atomic hard-link create rather than rename-overwrite semantics. If any process creates the final
file or symlink after preflight but before publication, `ln` fails with `EEXIST`, the backup exits
nonzero, the concurrent destination remains byte-for-byte intact, and the trap removes only the
randomly named temporary archive owned by this invocation. The fake `pg_dump` safety test creates
that destination immediately before returning and pins the failure and cleanup behavior.