Re: Need help to restore database

From: <adamr(at)informatyka(dot)gdansk(dot)pl>
To: "Lori, Giancarlo" <giancarlo(dot)lori(at)eds(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Need help to restore database
Date: 2009-03-17 11:01:01
Message-ID: b9d129649b83e20df2234e103182b2f0@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, 17 Mar 2009 09:50:55 +0100, "Lori, Giancarlo"
<giancarlo(dot)lori(at)eds(dot)com> 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message c k 2009-03-17 11:56:44 different results for large objects
Previous Message Lori, Giancarlo 2009-03-17 08:50:55 Need help to restore database