pg_upgrade 8.3 to 9.0, shutdown is to slow - Mailing list pgsql-admin
From | Bernhard Schrader |
---|---|
Subject | pg_upgrade 8.3 to 9.0, shutdown is to slow |
Date | |
Msg-id | 1296052245.2317.25.camel@schrader-laptop Whole thread Raw |
Responses |
Re: pg_upgrade 8.3 to 9.0, shutdown is to slow
|
List | pgsql-admin |
Hi all, I try to inplace migrate our postgresql databases from 8.3 to 9.0. So far, it worked by the testdbs I set up, it was really quick and I looked forward to migrate the live dbs. But here were some issues I didn't had in the test environment. If I start this command: """ su postgres -c "cd /usr/lib/postgresql/9.0/bin/; /usr/lib/postgresql/9.0/bin/pg_upgrade --link --check -g -v -d /var/lib/postgresql/8.3/main/ -D /var/lib/postgresql/9.0/main/ -b /usr/lib/postgresql/8.3/bin/ -B /usr/lib/postgresql/9.0/bin/ -l /tmp/migration.log" """ It starts the checking and all the things, at the end he trys to stop the db via pg_ctl, but here seems to be the error nested: """"/usr/lib/postgresql/8.3/bin/pg_ctl" -l "/tmp/migration.log" -D "/var/lib/postgresql/8.3/main" stop >> "/tmp/migration.log" 2>&1 waiting for server to shut down...2011-01-26 14:21:59 CET LOG: received smart shutdown request .......2011-01-26 14:22:05 CET FATAL: the database system is shutting down ..................................................... failed pg_ctl: server does not shut down There were problems executing "/usr/lib/postgresql/8.3/bin/pg_ctl" -l "/tmp/migration.log" -D "/var/lib/postgresql/8.3/main" stop >> "/tmp/migration.log" 2>&1 "/usr/lib/postgresql/8.3/bin/pg_ctl" -l "/tmp/migration.log" -D "/var/lib/postgresql/8.3/main" -m fast stop >> "/tmp/migration.log" 2>&1 2011-01-26 14:22:59 CET LOG: received fast shutdown request 2011-01-26 14:22:59 CET LOG: aborting any active transactions 2011-01-26 14:22:59 CET FATAL: terminating connection due to administrator command waiting for server to shut down....2011-01-26 14:22:59 CET LOG: shutting down 2011-01-26 14:22:59 CET LOG: database system is shut down done server stopped """ At the end it stopped, but with returncode 1. So it is broken here... :( Well, as I saw this first I thought I might forgot some db connections to terminate, but all services were down. A "ps -axuf" gives me the following output: """ postgres 26253 2.8 0.3 426264 10684 pts/1 S+ 14:21 0:01 /usr/lib/postgresql/8.3/bin/postgres -D /var/lib/postgresql/8.3/main - postgres 26255 0.0 0.0 426396 2044 ? Ss 14:21 0:00 \_ postgres: writer process postgres 26257 0.0 0.0 154368 1616 ? Ss 14:21 0:00 \_ postgres: stats collector process postgres 26258 0.0 0.1 427612 4188 ? Ss 14:21 0:00 \_ postgres: grepo DB_NAME LOCAL_IP(PORT) idle """ It seems that it waits for termination of its own process. With my testsetup i didn't get this error, maybe because it was much faster, because the used data were new and not fragmented or anything. If i try a /etc/init.d/postgresql-8.3 stop with user root it needs only 5 seconds and the db is down. Well, now I am stucked at this point and can't upgrade my databases, is there any way to increase the timeout? or another way to perform before the upgrade to reduce the stopping and starting time? Hope you have some hints for me. greetz Bernhard
pgsql-admin by date: