pg_upgrade log files

Started by Alvaro Herreraalmost 14 years ago3 messageshackers
Jump to latest
#1Alvaro Herrera
alvherre@2ndquadrant.com

Right now, the pg_upgrade output files contain the output of the
commands it runs. However, it does not contain the actual commands
being run ... so if you want to figure out what is happening, you have
to trace the pg_upgrade source while reading the log file.

This is, to say the least, suboptimal.

I propose this patch which echoes the commands to the respective log
files. I would backpatch this to 9.2.

As a note, I find the exec_prog() function rather bizarre. It would be
better if the caller did not have to manually specify a redirection, for
instance.

--
Álvaro Herrera <alvherre@alvh.no-ip.org>

Attachments:

0001-Make-the-pg_upgrade-log-files-contain-actual-command.patchapplication/octet-stream; name=0001-Make-the-pg_upgrade-log-files-contain-actual-command.patchDownload+14-4
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alvaro Herrera (#1)
Re: pg_upgrade log files

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:

I propose this patch which echoes the commands to the respective log
files. I would backpatch this to 9.2.

OK, but the fflush just before fclose seems a bit pointless; fclose
will do that anyway no?

regards, tom lane

#3Alvaro Herrera
alvherre@2ndquadrant.com
In reply to: Tom Lane (#2)
Re: pg_upgrade log files

Excerpts from Tom Lane's message of vie jun 29 01:04:13 -0400 2012:

Alvaro Herrera <alvherre@alvh.no-ip.org> writes:

I propose this patch which echoes the commands to the respective log
files. I would backpatch this to 9.2.

OK, but the fflush just before fclose seems a bit pointless; fclose
will do that anyway no?

Bah, yes, thanks. Pushed with that change.

--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support