Re: BUG #11090: Unclear error message in pg_upgrade

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #11090: Unclear error message in pg_upgrade
Дата
Msg-id 15100.1406687597@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #11090: Unclear error message in pg_upgrade  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: BUG #11090: Unclear error message in pg_upgrade  (David G Johnston <david.g.johnston@gmail.com>)
Re: BUG #11090: Unclear error message in pg_upgrade  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-bugs
Bruce Momjian <bruce@momjian.us> writes:
> What I think you actually can do is to run pg_upgrade with a user that
> is not the install user in either cluster, as long as the oids match.  I
> am afraid any more specific message could technically be wrong in some
> rare cases.

I think you missed my point.  I'm suggesting actually restricting what
pg_upgrade will accept, so that the error conditions become simpler to
understand.

Furthermore, if your description of the restrictions is accurate, then
restricting to "the user must be the bootstrap superuser in both clusters"
is actually not an extra restriction.  You said:

> o  only one user can be defined in the new cluster (most likely the
> install user)

If there is only one user in the new cluster, it *is* the bootstrap
superuser, because that user cannot be deleted.

> o  the oids of the two users must be the same (likely the install user
> on the old cluster as well)

If the OIDs are the same, then the old-cluster user is also the bootstrap
superuser, because the bootstrap superuser's hard-wired OID is 10.  QED.

So I think you should get rid of the existing error check and simplify it
to "user must be bootstrap superuser (ie, OID 10) in both clusters".
The existing approach adds only confusion, not flexibility.

> What I think you actually can do is to run pg_upgrade with a user that
> is not the install user in either cluster, as long as the oids match.

I don't think you actually can, and if you could, I frankly would not
trust the results.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: BUG #11090: Unclear error message in pg_upgrade
Следующее
От: David G Johnston
Дата:
Сообщение: Re: BUG #11090: Unclear error message in pg_upgrade