pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_upgrade on Windows
2+ messages / 2 participants
[nested] [flat]

* pg_upgrade on Windows
@ 2016-04-05 22:05  Marc Daelemans <marc@daelemans.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Marc Daelemans @ 2016-04-05 22:05 UTC (permalink / raw)
  To: 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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: pg_upgrade on Windows
@ 2016-04-05 23:03  John R Pierce <pierce@hogranch.com>
  parent: Marc Daelemans <marc@daelemans.com>
  0 siblings, 0 replies; 2+ messages in thread

From: John R Pierce @ 2016-04-05 23:03 UTC (permalink / raw)
  To: pgsql-bugs; marc@daelemans.com

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

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2016-04-05 23:03 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-04-05 22:05 pg_upgrade on Windows Marc Daelemans <marc@daelemans.com>
2016-04-05 23:03 ` John R Pierce <pierce@hogranch.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox