Jens Wilke wrote: > The restore script looks like: > > --snipp-- > from="$1"; > to="$2"; > while true; do > if test -f "$ARCHIVEDIR/$from"; then > src="$ARCHIVEDIR/$from"; > mv "$src" "$to"; > exit 0; > fi > # startup triggered > if test -f $triggerfile; then > exit 0; > fi > sleep 2; > done > --snipp-- You should not remove the segment until it's no longer needed. To figure that out you can use %r of restore_command. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support