Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 4EB761337B83 for ; Thu, 27 Jan 2011 11:44:37 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 79145-05 for ; Thu, 27 Jan 2011 15:44:30 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from extern.innogames.de (extern.innogames.de [80.252.99.240]) by mail.postgresql.org (Postfix) with ESMTP id EA3741337B5E for ; Thu, 27 Jan 2011 11:44:29 -0400 (AST) Received: from [172.16.5.29] (unknown [212.48.107.10]) by extern.innogames.de (Postfix) with ESMTPA id 4D4C928F18F; Thu, 27 Jan 2011 16:44:29 +0100 (CET) Subject: Re: pg_upgrade 8.3 to 9.0, shutdown is to slow From: Bernhard Schrader To: Kevin Grittner Cc: Bruce Momjian , pgsql-admin@postgresql.org In-Reply-To: <4D4138530200002500039E7E@gw.wicourts.gov> References: <201101270241.p0R2f4B25076@momjian.us> <1296116252.2220.6.camel@schrader-laptop> <4D4138530200002500039E7E@gw.wicourts.gov> Content-Type: text/plain; charset="UTF-8" Organization: Innogames GmbH Date: Thu, 27 Jan 2011 16:44:29 +0100 Message-ID: <1296143069.2330.4.camel@schrader-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201101/167 X-Sequence-Number: 36607 Am Donnerstag, den 27.01.2011, 09:18 -0600 schrieb Kevin Grittner: > Bernhard Schrader wrote: > > > what maybe is also interesting, if i start the database manually i > > have a huge waiting IO of 23% for a time of maybe 2-5 minutes, i > > think it is because of the fragmentation of the tables. > > > > is the shutdown so slow because of the waiting io? but why can i > > stop it as user root without problems... > > How do you "stop it as user root", exactly? If you kill PostgreSQL > too abruptly, the recovery could easily run for several minutes with > a lot of I/O while it recovers. > > Taking pg_upgrade out of the picture for a minute -- how long do > shutdowns and startups normally take you? > > -Kevin > well, i tested it now with user postgres, the same command as the program, and it didnt shut down the server, the log gives me the notice that it want to shut down but it doesnt happen, maybe this stop method is to "friendly". i tested it with the already running db, so there were no waiting io or anything.. with option "-m fast" it stops without problems. normally i do it as user root with /etc/init.d/postgresql-8.3 (stop| start) and the shutdown takes about 5-10 seconds, the start the same but with some waiting io, which takes up to 5 minutes of bad perfomance.