Cpp crusaders
Cpp crusaders

Reputation: 111

Postgres: pg_base_backup fails

Pg_base_backup will fail with error

pg_basebackup: could not get WAL end position from server: FATAL: requested WAL segment 000000010000000300000068 has already been removed

I guess this happens because database is receiving lot of data (Restriction: We are using postgres-9.1)

Upvotes: 1

Views: 2470

Answers (1)

jjanes
jjanes

Reputation: 44137

See the note in the docs:

Note: The transaction log files are collected at the end of the backup. Therefore, it is necessary for the wal_keep_segments parameter to be set high enough that the log is not removed before the end of the backup. If the log has been rotated when it's time to transfer it, the backup will fail and be unusable.

That is what you are seeing.

So, try increasing wal_keep_segments. Or upgrade off from 9.1, where better options become available. Or set up WAL archiving.

Upvotes: 3

Related Questions