Re: pg_upgrade --logfile option documentation

Bruce Momjian <bruce@momjian.us>

From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: "A.M." <agentm@themactionfaction.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2012-03-12T23:49:35Z
Lists: pgsql-hackers

Attachments

On Thu, Mar 08, 2012 at 08:33:48PM -0500, Bruce Momjian wrote:
> OK, it seems people do care about keeping log files from multiple runs
> so I went with Tom's idea and have:
> 
> 	-----------------------------------------------------------------
> 	  pg_upgrade run on Thu Mar  8 19:30:12 2012
> 	-----------------------------------------------------------------
> 	
> 	Performing Consistency Checks
> 	-----------------------------
> 
> Updated patch attached.
> 
> FYI, in retain mode, these are the files left in the current directory:
> 
> 	delete_old_cluster.sh
> 	pg_upgrade_dump_all.sql
> 	pg_upgrade_dump_db.sql
> 	pg_upgrade_dump_globals.sql
> 	pg_upgrade_internal.log
> 	pg_upgrade_restore.log
> 	pg_upgrade_server.log
> 	pg_upgrade_utility.log
> 
> I will address the idea of using /tmp in another email.

OK, attached pg_upgrade patch applied, with this list of improvements in
logging:

        add ability to control permissions of created files
        have psql echo its queries for easier debugging
        output four separate log files, and delete them on success
        add -r/--retain option to keep log files after success
        make log files append-only
        remove -g/-G/-l logging options
        sugggest tailing appropriate log file on failure
        enhance -v/--verbose behavior

Thanks for all the feedback.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +