Prev: [HACKERS] 9.0beta2 - server crash when using HS + SR
Next: [HACKERS] GSoC - Materialized Views - is stale or fresh?
From: Bruce Momjian on 11 Jun 2010 23:58 Andrew Dunstan wrote: > > Why does pg_upgrade create its output directory in the user's home > directory (or TMP on Windows)? I should have thought that the current > working directory would be a more suitable choice. At the very least > there should be an option for where to create it. Also, this location > doesn't seem to be referred to at all in the docs. Yeah, it is odd. I did it that way because the output files need to exist after the utility is run, and I worried that putting them in the current directory might cause them to be accidentally deleted or overlooked. However, I might have been too conservative. How do tools that generate multiple output files usually handle this situation? Do they output in to a subdirectory in $HOME, or in a subdirectory of the current directory, or just create multiple files without a subdirectory? -- Bruce Momjian <bruce(a)momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + None of us is going to be here forever. + -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Greg Stark on 12 Jun 2010 06:57 On Sat, Jun 12, 2010 at 4:58 AM, Bruce Momjian <bruce(a)momjian.us> wrote: > However, I might have been too conservative. �How do tools that generate > multiple output files usually handle this situation? �Do they output in > to a subdirectory in $HOME, or in a subdirectory of the current > directory, or just create multiple files without a subdirectory? Generally they put them in the current directory without subdirectories but take a parameter to specify a directory to use. That parameter could be mandatory though if you're afraid the current directory isn't a suitable place. -- greg -- Sent via pgsql-hackers mailing list (pgsql-hackers(a)postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
From: Bruce Momjian on 12 Jun 2010 13:12
Greg Stark wrote: > On Sat, Jun 12, 2010 at 4:58 AM, Bruce Momjian <bruce(a)momjian.us> wrote: > > However, I might have been too conservative. ?How do tools that generate > > multiple output files usually handle this situation? ?Do they output in > > to a subdirectory in $HOME, or in a subdirectory of the current > > directory, or just create multiple files without a subdirectory? > > Generally they put them in the current directory without > subdirectories but take a parameter to specify a directory to use. > That parameter could be mandatory though if you're afraid the current > directory isn't a suitable place. Agreed. I have applied the attached patch which creates the files in the current directory. I think that will be fine and don't see any need for a directory parameter. I have kept the printing of the full path name in the output: Upgrade complete ---------------- | Optimizer statistics is not transferred by pg_upgrade | so consider running: | vacuumdb --all --analyze-only | on the newly-upgraded cluster. | Running this script will delete the old cluster's data files: | /u/pg_migrator/pg_migrator/delete_old_cluster.sh I figured this would be helpful for people on Windows who might not know the actual directory used for the files. However, it does make the display kind of wide. Ideas? -- Bruce Momjian <bruce(a)momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + None of us is going to be here forever. + |