Don't crash when pg_xlog is empty and pg_basebackup -x is used

Magnus Hagander <magnus@hagander.net>

Commit: 3979ff1fc6e9dd7847ff9bb24beb4d03ebe02cef
Author: Magnus Hagander <magnus@hagander.net>
Date: 2013-08-24T15:14:09Z
Releases: 9.2.5
Don't crash when pg_xlog is empty and pg_basebackup -x is used

The backup will not work (without a logarchive, and that's the whole
point of -x) in this case, this patch just changes it to throw an
error instead of crashing when this happens.

Noticed and diagnosed by TAKATSUKA Haruka

Files

PathChange+/−
src/backend/replication/basebackup.c modified +8 −0