Re: pg_upgrade issues

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: depstein(at)alliedtesting(dot)com
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: pg_upgrade issues
Date: 2010-06-22 16:31:51
Message-ID: 201006221631.o5MGVpe15562@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

depstein(at)alliedtesting(dot)com wrote:
> PostgreSQL 9.0 beta 2 Windows XP Professional SP2
>
> While migrating the database from 8.4 to 9.0 using pg_upgrade (now part
> of the Postgres project), the following issues came up:
>
> 1. When using the --logfile option, pg_upgrade quits with an error like
> this:
>
> The process cannot access the file because it is being used by another
> process.
>
> There were problems executing ""C:\PostgreSQL\8.4\bin/pg_ctl" -l
> "pg_upgrade.log " -D "D:\PostgreSQL84_matlab1b" -o "-p 5432 -c
> autovacuum=off -c autovacuum_free ze_max_age=2000000000" start >>
> "pg_upgrade.log" 2>&1"

[ Email moved to hackers list.]

Ah, interesting. I did some research and it turns out there is no way to
send server output and pg_ctl output to the same file on Win32. I have
updated the pg_ctl docs to reflect this (first attached patch). I have
also developed a patch (second attached patch) that sends pg_ctl output
to 'nul' on win32 so we can store the server output in the log file.

> 2. Although pg_upgrade has a username option, this option is not used
> when pg_dump is called, which tries to use the current logon account
> name as the user name. As a result, pg_upgrade can only be used when
> the command shell is launched under the postgres account. (I know that
> this is mentioned on the doc page, but this doesn't seem right).

Thanks, fixed in second attached patch.

> 3. The old database had the pgadmin debugger installed. The module is
> part of 8.4 and 9.0 distributions for Windows. However, pg_upgrade
> reported the following error:
>
> ERROR: could not load library "C:/PostgreSQL/9.0/lib/pldbgapi.dll":
> The specified module could not be found.
>
> I had to uninstall the debugger from the old database before I could
> proceed.

Uh, pg_upgrade has to have the same dll's, so I suggest you install that
into the new server the same way you did in the old server. If it was
installed by the old installer, the new installer should have done the
same.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ None of us is going to be here forever. +

Attachment Content-Type Size
/rtmp/doc.diff text/x-diff 2.2 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2010-06-22 16:43:47 Re: pg_upgrade issues
Previous Message Peter Mengaziol 2010-06-22 12:30:22 BUG #5520: PG unable to find java stored procs without input parameters

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2010-06-22 16:32:08 Re: TCP keepalive support for libpq
Previous Message Robert Haas 2010-06-22 16:16:49 Re: TCP keepalive support for libpq