Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> I'm not sure about the initdb reference - there won't be any tablespaces
> to check for during initdb, will there?
No, but I think pg_tblspc/ itself might not be there either. Just a
case to test your patch on ...
regards, tom lane