Re: pg_upgrade should truncate/remove its logs before running

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Michael Paquier <michael@paquier.xyz>, Justin Pryzby <pryzby@telsasoft.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Daniel Gustafsson <daniel@yesql.se>, Andrew Dunstan <andrew@dunslane.net>, Bruce Momjian <bruce@momjian.us>, pgsql-hackers@lists.postgresql.org
Date: 2022-01-20T09:31:15Z
Lists: pgsql-hackers
On 19.01.22 09:13, Michael Paquier wrote:
> - Renaming of the option from --logdir to --outputdir, as this does
> not include only logs.  That matches also better with default value
> assigned in previous patches, aka pg_upgrade_output.d.

I'm afraid that is too easily confused with the target directory. 
Generally, a tool processes data from input to output or from source to 
target or something like that, whereas a log is more clearly something 
separate from this main processing stream.  The desired "output" of 
pg_upgrade is the upgraded cluster, after all.

A wildcard idea is to put the log output into the target cluster.



Commits

  1. pg_upgrade: Move all the files generated internally to a subdirectory