"Jessica Ord" <jo@uk.xo.com> writes:
> I am not sure if the 'initdb --template' command has also cleared away all
> the system index tables as well.
initdb --template? Why are you using that? I think that's a poorly
debugged (to put it kindly) feature. I'd recommend staying away from
it. Assuming that you are careful not to put any user data into
template1, there is no reason ever to reinitialize template1 after the
initial initdb.
At this point I think you may have to do a full initdb to get back into
a good state. If you have backups of everything, that seems like the
way to go rather than trying to dig your way out of the hole bit by bit.
regards, tom lane