On 03/06/2015 11:22 AM, Matt Landry wrote:
> On 03/06/2015 12:37 PM, Adrian Klaver wrote:
>> Agreed, I am just trying to figure out how you get:
>>
>> CREATE DATABASE "template0" WITH TEMPLATE = template0 ..
>>
>> Seems to be a snake eating its tail:)
>
> Yes. It does. And it's pretty obvious why having this would be a
> problem...not quite so obvious how to not have it.
>
> For the record, I inherited this DB configuration, but I can say with
> certainty that we have _one_ actual database with data in it, and it's
> not "template0". If it turns out that, in order to do what I need to do,
> we need to either drop (or rename, or whatever) template0 or somehow
> manually exclude the attempt to upgrade template0, and that for some
> reason we have local modifications to that template that will then have
> to be re-done, then that's a totally acceptable solution, from my
> perspective, as long as we (that is, me and all the people who read the
> pg_upgrade documentation in the future) know how to do that.
So on the original cluster, log in using psql and do \l and post the
results here. Thanks.
>
> But figuring out how it managed to get into this condition in the first
> place, and how pg_upgrade can be made to programmatically cope with
> that, is probably more important for all the users who aren't me. :)
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com