Re: libpq environment variables in the server

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: libpq environment variables in the server
Дата
Msg-id 20190315040053.GB2607362@rfd.leadboat.com
обсуждение исходный текст
Ответ на Re: libpq environment variables in the server  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: libpq environment variables in the server
Список pgsql-hackers
Looks good.

On Thu, Mar 14, 2019 at 12:06:45PM +0100, Peter Eisentraut wrote:
> +    # Temporarily unset PGAPPNAME so that the server doesn't inherit
> +    # it.  Otherwise this could affect libpqwalreceiver connections in
> +    # confusing ways.
> +    my $save_pgappname = $ENV{PGAPPNAME};
> +    delete $ENV{PGAPPNAME};
> +
>      # Note: We set the cluster_name here, not in postgresql.conf (in
>      # sub init) so that it does not get copied to standbys.
>      my $ret = TestLib::system_log('pg_ctl', '-D', $self->data_dir, '-l',
>          $self->logfile, '-o', "--cluster-name=$name", 'start');
>  
> +    $ENV{PGAPPNAME} = $save_pgappname;
> +

I consider the following style more idiomatic:

 {
     local %ENV;
     delete $ENV{PGAPPNAME};
     ...
 }

I'm okay with the way you've written it, though.


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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: Index Skip Scan
Следующее
От: Pavel Stehule
Дата:
Сообщение: string_to_array, array_to_string function without separator