Lists: | pgsql-bugs |
---|
From: | "Marc Daelemans" <marc(at)daelemans(dot)com> |
---|---|
To: | <pgsql-bugs(at)postgresql(dot)org> |
Subject: | pg_upgrade on Windows |
Date: | 2016-04-05 22:05:29 |
Message-ID: | 003001d18f877facf0$cd7f06d0$@daelemans.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
Dear,
When one attempts to run pg_upgrade on Windows (7 SP 1 x64) the command
produces a failure notice, probably because writing to (log) files in
C:\Program Files and its subdirectories is not allowed.
C:\Program Files\PostgreSQL\9.5>pg_upgrade.exe --old-datadir "C:/Program
Files/P
ostgreSQL/9.4/data" --new-datadir "C:/Program Files/PostgreSQL/9.5/data"
--old-b
indir "C:/Program Files/PostgreSQL/9.4/bin" --new-bindir "C:/Program
Files/Postg
reSQL/9.5/bin"
cannot write to log file pg_upgrade_internal.log
Failure, exiting
Is there a way to redirect the log file to another file location?
Best regards,
Marc Daelemans
From: | John R Pierce <pierce(at)hogranch(dot)com> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org, marc(at)daelemans(dot)com |
Subject: | Re: pg_upgrade on Windows |
Date: | 2016-04-05 23:03:25 |
Message-ID: | 5704443D.1080703@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-bugs |
On 4/5/2016 3:05 PM, Marc Daelemans wrote:
>
> When one attempts to run pg_upgrade on Windows (7 SP 1 x64) the
> command produces a failure notice, probably because writing to (log)
> files in C:\Program Files and its subdirectories is not allowed.
>
> C:\Program Files\PostgreSQL\9.5>pg_upgrade.exe --old-datadir
> "C:/Program Files/PostgreSQL/9.4/data" --new-datadir "C:/Program
> Files/PostgreSQL/9.5/data" --old-bindir "C:/Program
> Files/PostgreSQL/9.4/bin" --new-bindir "C:/Program
> Files/PostgreSQL/9.5/bin"
>
> cannot write to log file pg_upgrade_internal.log
>
> Failure, exiting
>
> Is there a way to redirect the log file to another file location?
>
wild guess says its writing that to the current default directory.
try running it from a directory you have write access to, such as
c:\Users\MyUsername and specify the path for pg_upgrade, like...
C:\Users\MyUsername> C:\Program Files\PostgreSQL\9.5\bin\pg_upgrade
--old-datadir "C:/Program Files/PostgreSQL/9.4/data" --new-datadir
"C:/Program Files/PostgreSQL/9.5/data" --old-bindir "C:/Program
Files/PostgreSQL/9.4/bin" --new-bindir "C:/Program
Files/PostgreSQL/9.5/bin"
--
john r pierce, recycling bits in santa cruz