Control: tags -1 moreinfo

Re: Andrey Borodin 2019-06-19 
<3fd6aec7-55c8-4129-a46c-0bb3e4296...@yandex-team.ru>
> Package: postgresql-common
> Version: 199
> 
> When I execute
> service postgresql start
> I observe that logfile descriptor will leak into postmaster and every 
> backend. This is not fd opened by PG's syslogger.

That's because we use logging to stderr.

> -            my $fd = POSIX::open($info{'logfile'}, 
> POSIX::O_WRONLY|POSIX::O_APPEND|POSIX::O_CREAT) or error "Could not open 
> logfile $info{'logfile'}";
> -            dup2($fd, 1);
> -            dup2($fd, 2);
> +            open(STDOUT, ">>$info{logfile}") or die $!;
> +            open(STDERR,  '>&STDOUT')  or die $!;

Does that actually do things differently? Does stderr logging still
work with that patch?

Christoph

Reply via email to