"Cannot Write to Log File Pg_Upgrade_Internal.Log" When Upgrading from Postgresql 9.1 to 9.3

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



Leave a reply



Submit