Re: Testing 9.0beta3 and pg_upgrade

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Thomas Kellerer <spam_eater(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Testing 9.0beta3 and pg_upgrade
Date: 2010-07-13 20:05:03
Message-ID: 201007132005.o6DK53s10281@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thomas Kellerer wrote:
> Checking new data directory (c:/etc/Postgres9.0-beta3/datadir)ok
> ""c:/Program Files/PostgreSQL/8.4/bin/pg_ctl" -l "migrate.log" -D
> "c:/Daten/db/pgdata84" -o "-p 5432 -c autovacuum=off -c
> autovacuum_freeze_max_age=20 00000000" start >> "nul" 2>&1" Trying to
> start old server ...........
> Unable to start old postmaster with the command: ""c:/Program
> Files/PostgreSQL/8.4/bin/pg_ctl" -l "migrate.log" -D
> "c:/Daten/db/pgdata84" -o "-p 5432 -c autovacuum=off -c
> autovacuum_freeze_max_age=2000000000" start >> "nul" 2>&1" Perhaps
> pg_hba.conf was not set to "trust".
>
> Now when I manually copy and paste the logged command, the server starts
> up fine and I can verify with ProcessExplorer that pg_upgrade indeed
> does not spawn a postgres.exe (or pg_ctl.exe)
>
> As I have done one successful migration already, and the only difference
> was the logfile, I removed the --logfile switch from the batch file
> and then pg_upgrade ran without problems.
>
> In the commandline starting the old server -l "migrate.log" is replaced
> with -l "nul"

> I _think_ the reason for this is that pg_upgrade locks migrate.log and
> then postgres.exe cannot write to the file and thus fails to start.
> When I manually run the command, pg_upgrade is not locking migrate.log
> and therefor the server starts (and thus the confusion that the same
> command works from the commandline but not when pg_upgrade runs it)

Your diagnosis is correct. I thought we had fixed this by having pg_ctl
output go to NUL, but it turns out even server logs can't go to nul
either if we are already logging to that file. Attached patch removes
logging of pg_ctl and server output on win32.

> P.S.: pg_upgrade --help says: "Report bugs to
> <pg-migrator-general(at)lists(dot)pgfoundry(dot)org>" Shouldn't that be changed
> as well?

Oops, fixed as well. Thanks.

--
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/diff text/x-diff 2.3 KB
/rtmp/diff text/x-diff 2.3 KB

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Sabino Mullane 2010-07-13 20:15:57 Re: No PL/PHP ? Any reason?
Previous Message Anthony Presley 2010-07-13 19:53:25 Idle In Transaction