Re: Testing 9.0beta3 and pg_upgrade

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Testing 9.0beta3 and pg_upgrade
Дата
Msg-id i1ho4n$8d3$1@dough.gmane.org
обсуждение исходный текст
Ответ на Testing 9.0beta3 and pg_upgrade  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: Testing 9.0beta3 and pg_upgrade  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-general
Thomas Kellerer, 12.07.2010 23:29:
> Hi,
>
> I'm trying pg_upgrade on my Windows installation and I have two
> suggestions for the manual regarding pg_upgrade:
>

I found another problem and I'm not sure if this is a bug or a user error :)

My batch file to start pg_upgrade looks like this:

%~dp0server\bin\pg_upgrade ^
       --check ^
       --old-bindir="c:/Program Files/PostgreSQL/8.4/bin" ^
       --new-bindir="c:/etc/Postgres9.0-beta3/server/bin" ^
       --old-datadir="c:/Daten/db/pgdata84" ^
       --new-datadir="c:/etc/Postgres9.0-beta3/datadir" ^
       --user=postgres ^
       --logfile=migrate.log ^
       --verbose

with these settings pg_upgrade fails to start the old server.

On the console I can see:

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
-cautovacuum_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
thatpg_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
switchfrom 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
thusfails to start. 
When I manually run the command, pg_upgrade is not locking migrate.log and therefor the server starts (and thus the
confusionthat the same command works from the commandline but not when pg_upgrade runs it) 

Regards
Thomas

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




В списке pgsql-general по дате отправления:

Предыдущее
От:
Дата:
Сообщение: Writing XML files to Operating System
Следующее
От: Josip Rodin
Дата:
Сообщение: Re: simple functions, huge overhead, no cache