Re: pg_upgrade and PGPORT

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_upgrade and PGPORT
Дата
Msg-id 3158.1305137918@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pg_upgrade and PGPORT  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: pg_upgrade and PGPORT
Re: pg_upgrade and PGPORT
Список pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> A larger question is whether we should just disable all the checks for
> environment variables.  The C comment says:

>  * check_for_libpq_envvars()
>  *
>  * tests whether any libpq environment variables are set.
>  * Since pg_upgrade connects to both the old and the new server,
>  * it is potentially dangerous to have any of these set.
>  *
>  * If any are found, will log them and cancel.

> I am not sure what to do.

Well, the risk mentioned in that comment certainly seems real.

An alternative solution that might be more user-friendly is to ensure
that the connection strings pg_upgrade uses specify all important
options, leaving nothing to be overridden by environment variables.
Then you don't need to make the user adjust his environment.

Or you could just "unsetenv" instead of complaining.

I would like to think that eventually pg_upgrade won't start a
postmaster at all, but connect using something more like a standalone
backend.  So someday the issue might go away --- but that someday
isn't especially close.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: potential bug in trigger with boolean params
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pg_upgrade and PGPORT