Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> writes:
> To fix, whenever we switch to a new timeline, scan the data directory for
> WAL segments on the old timeline, but with a higher segment number, and
> remove them.
Wait a minute. Didn't you just break PITR scenarios? The *entire point*
of the multiple-timeline mechanism is that you can start a new WAL history
from a point in the past without destroying WAL history after that point
on the old timeline.
I've not read the patch, so maybe the code is all right, but this
description most certainly is not.
regards, tom lane