In CNPG E2E tests, we take several snapshots of a running PostgreSQL cluster. Sometimes, the snapshot fails because a file is deleted between when tar gathers the file list and when it is read. This is an example of the failure:
can't execute snapshot backup: Failed to create snapshot: failed to take snapshot of the volume a62e8015-3ab3-11ef-813a-829810a7d821: "rpc error: code = Unknown desc = failed create snapshot: exit status 1: tar: ./pgdata/base/1/pg_internal.init: No such file or directory\ntar: error exit delayed from previous errors\n"
The file pg_internal.init is the PostgreSQL relation cache and is deleted and recreated during PostgreSQL startup.
In CNPG E2E tests, we take several snapshots of a running PostgreSQL cluster. Sometimes, the snapshot fails because a file is deleted between when tar gathers the file list and when it is read. This is an example of the failure:
The file
pg_internal.init
is the PostgreSQL relation cache and is deleted and recreated during PostgreSQL startup.