Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 1A98F6323B0 for ; Tue, 17 Mar 2009 08:07:50 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 66193-01 for ; Tue, 17 Mar 2009 08:07:40 -0300 (ADT) X-Greylist: delayed 00:06:39.427758 by SQLgrey-1.7.6 Received: from ns7.peker.com.pl (ns7.peker.com.pl [85.222.108.104]) by mail.postgresql.org (Postfix) with ESMTP id A56E1632246 for ; Tue, 17 Mar 2009 08:07:46 -0300 (ADT) Received: (qmail 16107 invoked by uid 89); 17 Mar 2009 11:01:03 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=private; d=informatyka.gdansk.pl; b=X4VKylM3DA7dz2ysSYFA1bjVHS5uQWE41OI/+D4mhovNd6PgUqui5ywWEt7jOd/J; Received: from unknown (HELO localhost) (adamr@informatyka.gdansk.pl@127.0.0.1) by localhost with ESMTPA; 17 Mar 2009 11:01:03 -0000 MIME-Version: 1.0 Date: Tue, 17 Mar 2009 12:01:01 +0100 From: To: "Lori, Giancarlo" Cc: pgsql-admin@postgresql.org Subject: Re: Need help to restore database In-Reply-To: <556F27B79E1523449D310FCABD94333001958C10@derum205.emea.corp.eds.com> References: <556F27B79E1523449D310FCABD94333001958C10@derum205.emea.corp.eds.com> Message-ID: X-Sender: adamr@informatyka.gdansk.pl User-Agent: RoundCube Webmail/0.1-rc2 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="UTF-8" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/183 X-Sequence-Number: 31683 On Tue, 17 Mar 2009 09:50:55 +0100, "Lori, Giancarlo" wrote: > Hi all, > we are facing with a struggle problem with PostgreSql database > production. > A client system based on pgsql is down because the database raise an > error message like " no left space on device". We have deleted some log > files on this machine and after a system restart the db (and the system) > was up&running. After two days the database has crashed again. Looking > the postgres log there was an error on xlog file (I have inspected the > directory pg_xlog and no files I found it). I'll try to re-build the > xlog file with pg_resetxlog. The utilities has created a new xlog file, > the postmaster process run, but any command pg_dump, etc I try to > execute failed. The system respond that there are not database in the > system. Can anyone help us ? > > Thanks in advance > Giancarlo Maybe it's not good idea, but... First - stop the postgreSQL service. Make the copy of Your database cluster and existing tablespaces. Try to run a standalone backend instead normal PostgreSQL, giving for switch -P name of database "postgres". You can run it like this (if Your system user, who usually rruns postgresql service is named "postgres" - when not, use for "su the proper account name": su postgres -c "/usr/local/pgsql/bin/postgres -D /home/postgres/bazy -O -P postgres" In "standalone backend" You can run SQL commands - run VACUUM FULL. Press Ctrl+D to leave the standalone backend. Repeat this all for Your database and other, wchich are listed for VACUUM, when standalone backend starts. Read about "standalone backend" in the PostgreSQL documenatation. If You running PostgreSQL on Windows server, use runas with its specific options instead su, of course. Brgds Adam