> On 13 Jun 2019, at 10:19, Peter Eisentraut <peter.eisentr...@2ndquadrant.com> > wrote:
> Currently, calling pg_upgrade with an invalid command-line option aborts > pg_upgrade but leaves a pg_upgrade_internal.log file lying around. This > patch reorder things a bit so that that file is not created until all > the options have been parsed. +1 on doing this. + if ((log_opts.internal = fopen_priv(INTERNAL_LOG_FILE, "a")) == NULL) + pg_fatal("could not write to log file \"%s\"\n", INTERNAL_LOG_FILE); While we’re at it, should we change this to “could not open log file” to make the messaging more consistent across the utilities (pg_basebackup and psql both use “could not open”)? cheers ./daniel