Re: Can't get postmaster to restart after removing WAL files

Lists: pgsql-admin
From: Robert(dot)Farrugia(at)go(dot)com(dot)mt
To: nickf(at)ontko(dot)com
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Can't get postmaster to restart after removing WAL files
Date: 2001-09-12 13:06:44
Message-ID: OFE41A1054.105B0BDC-ONC1256AC5.00475D90@go.com.mt
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

You can try running pg_resetxlog (situated in the contrib directory in the
source). It will reset the wal files and will allow you to restart the
postmaster. It is not the recommended way but I used in in dire
emergencies and it worked.

Normally, when you fill up the drive because of WALs, you should try to
free up 16MB. If the drive is the same as the database, you can move one
file from the database directory to another partition, create a soft link
to the file, and restart the database. Once the WAL files are removed by
the postmaster, you should stop it, and copy back the file. Try to upgrade
to 7.1.3 since it solves some issues where long transactions take up an
unordinated amount of space unecessary.

As regards to the space required by the WAL files this depends on the
configuration (postgresql.conf). There is a paramter which controls the
amount of WAL files to create (each file takes 16MB).

Hope it helps
Robert


From: "Nick Fankhauser" <nickf(at)ontko(dot)com>
To: <Robert(dot)Farrugia(at)go(dot)com(dot)mt>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Can't get postmaster to restart after removing WAL files
Date: 2001-09-12 14:12:40
Message-ID: NEBBLAAHGLEEPCGOBHDGKEIEDKAA.nickf@ontko.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-admin

> You can try running pg_resetxlog (situated in the contrib directory in the
> source). It will reset the wal files and will allow you to restart the
> postmaster.

I just did an initdb as suggested by Randy since the data was easy to
recreate, but this is good to know as a fallback for future situations!

> Try to upgrade
> to 7.1.3 since it solves some issues where long transactions take up an
> unordinated amount of space unecessary.

I was running v7.1.3 & only had two 41Mb databases running in the cluster,
which was why I was kinda' caught off guard by having 48Mb used in WAL
files.

> As regards to the space required by the WAL files this depends on the
> configuration (postgresql.conf). There is a paramter which controls the
> amount of WAL files to create (each file takes 16MB).

This helps, but I'm a bit confused- What if I'm runnning an enormous update
& I really need 4 WAL files, but I've set the limit at 3? Will an fsync be
forced so that the first file will be deleted & the space reused?

It sounds like I can limit the space used to match what I have available,
but I'm not sure if this will cause a problem if I'm too stingy on my space
allocation.

Thanks Robert & others for your help with this!

-Nick

---------------------------------------------------------------------
Nick Fankhauser

Business:
nickf(at)doxpop(dot)com Phone 1.765.965.7363 Fax 1.765.962.9788
doxpop - Court records at your fingertips - http://www.doxpop.com/

Personal:
nick(at)fankhausers(dot)com http://www.fankhausers.com