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.

Reply via email to