pg_upgrade message

Started by Peter Eisentrautalmost 14 years ago2 messages
#1Peter Eisentraut
peter_e@gmx.net

pg_upgrade prints something like this:

Restoring user relation files
/var/lib/postgresql/8.4/main/base/35338/37229

But it's not actually "restoring" anything, is it?

Maybe "transferring" would be better? (Or copying/linking, to be more
precise.)

#2Bruce Momjian
bruce@momjian.us
In reply to: Peter Eisentraut (#1)
1 attachment(s)
Re: pg_upgrade message

On Wed, Feb 15, 2012 at 07:50:41PM +0200, Peter Eisentraut wrote:

pg_upgrade prints something like this:

Restoring user relation files
/var/lib/postgresql/8.4/main/base/35338/37229

But it's not actually "restoring" anything, is it?

Maybe "transferring" would be better? (Or copying/linking, to be more
precise.)

What an excellent idea; I changed it to say link/copy, with the
attached, applied patch. The new output is:

Creating databases in the new cluster ok
Adding support functions to new cluster ok
Restoring database schema to new cluster ok
Removing support functions from new cluster ok
--> Linking user relation files
ok
Setting next OID for new cluster ok
Creating script to delete old cluster ok

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

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

Attachments:

pg_upgrade.difftext/x-diff; charset=us-asciiDownload
diff --git a/contrib/pg_upgrade/relfilenode.c b/contrib/pg_upgrade/relfilenode.c
new file mode 100644
index 54ee5f0..a1e30b1
*** a/contrib/pg_upgrade/relfilenode.c
--- b/contrib/pg_upgrade/relfilenode.c
*************** transfer_all_new_dbs(DbInfoArr *old_db_a
*** 37,43 ****
  	int			old_dbnum, new_dbnum;
  	const char *msg = NULL;
  
! 	prep_status("Restoring user relation files\n");
  
  	/* Scan the old cluster databases and transfer their files */
  	for (old_dbnum = new_dbnum = 0;
--- 37,44 ----
  	int			old_dbnum, new_dbnum;
  	const char *msg = NULL;
  
! 	prep_status("%s user relation files\n",
! 		user_opts.transfer_mode == TRANSFER_MODE_LINK ? "Linking" : "Copying");
  
  	/* Scan the old cluster databases and transfer their files */
  	for (old_dbnum = new_dbnum = 0;