Re: Need help to restore database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux