pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: adamr@informatyka.gdansk.pl
To: Lori, Giancarlo <giancarlo.lori@eds.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Need help to restore database
Date: Tue, 17 Mar 2009 12:01:01 +0100
Message-ID: <b9d129649b83e20df2234e103182b2f0@localhost> (raw)
In-Reply-To: <556F27B79E1523449D310FCABD94333001958C10@derum205.emea.corp.eds.com>
References: <556F27B79E1523449D310FCABD94333001958C10@derum205.emea.corp.eds.com>

On Tue, 17 Mar 2009 09:50:55 +0100, "Lori, Giancarlo"
<giancarlo.lori@eds.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



view thread (5+ messages)  latest in thread

Message-ID: <b9d129649b83e20df2234e103182b2f0@localhost>
Permalink:  ../b9d129649b83e20df2234e103182b2f0@localhost/
Also on:    postgresql.org/message-id/b9d129649b83e20df2234e103182b2f0@localhost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: adamr@informatyka.gdansk.pl, giancarlo.lori@eds.com
  Subject: Re: Need help to restore database
  In-Reply-To: <b9d129649b83e20df2234e103182b2f0@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox