pg_upgrade on Windows cannot write to log file pg_upgrade_internal.log
So the source code comment at /src/bin/pg_upgrade/file.c#L243 /* fopen() file with no group/other permissions */
gave me an idea.
I created a temp folder at C:\temp and gave Write permissions to Everyone, and then ran pg_upgrade from that directory, i.e.
C:\temp>C:\Apps\postgresql\pgsql-9.5.0\bin\pg_upgrade.exe --old-datadir=E:\PGSQL_data --new-datadir=E:\PGSQLData\pgsql-9.5 --old-bindir=C:\Apps\postgresql\pgsql-9.4.5.3\bin --new-bindir=C:\Apps\postgresql\pgsql-9.5.0\bin
Whereas before I was trying to run pg_upgrade from the working directory %PGSQL%\bin
which did not have a Write permissions to Everyone.
Now I don't get the cannot write to log file pg_upgrade_internal.log
error anymore.
The docs actually say pg_upgrade requires write permission in the current directory.
Where is Postgres 9.1 log located by default in Ubuntu
In RedHat like distributions it would be in /var/lib/pgsql/pgstartup.log
or look for the variable PGLOG
in the init script in /etc/init.d/postgresql
Related Topics
Cmake Set Environment Variable
Curl: (2) Failed Initialization
Getting Current Working Directory Within Kernel Code
Kubernetes Can't Start Due to Too Many Open Files in System
Calculate Mean of Each Column Ignoring Missing Data with Awk
Redirect Two or More Stdout to a Single Stdin
Xclip Does Not Terminate When Tracing It
How to Set a Dynamic Variable in Haproxy
Is There a Subversion Web Client That I Can Use
Using a Command That Needs Backticks to Be Passed as Part of an Argument in Bash
How to Do a One Way Diff in Linux
Mod_Rewrite with Relative Path Redirects
Running Script in Crontab--Reboot: Command Not Found
Subprocess Library Won't Execute Compgen
Can the Sys_Execve() System Call in the Linux Kernel Receive Both Absolute or Relative Paths