Enumerate available tablespaces after starting the backup

Magnus Hagander <magnus@hagander.net>

Commit: 3866ff6149a3b072561e65b3f71f63498e77b6b2
Author: Magnus Hagander <magnus@hagander.net>
Date: 2011-01-15T18:31:16Z
Releases: 9.1.0
Enumerate available tablespaces after starting the backup

This closes a race condition where if a tablespace was created
after the enumeration happened but before the do_pg_start_backup()
was called, the backup would be incomplete. Now that it's done
while we are in backup mode, WAL replay will recreate it during
restore.

Noted by Heikki.

Files

PathChange+/−
src/backend/replication/basebackup.c modified +40 −37