Stupid question about WAL archiving

Started by Glyn Astillabout 18 years ago7 messagesgeneral
Jump to latest
#1Glyn Astill
glynastill@yahoo.co.uk

My server ran out of disk space because my archive directory was full
ow write ahead logs.

My warm standby had lost it's mounted NFS volume and thus stopped
reading in the archives from the master.

Would I have run out of space if the standby hadn't stopped reading
them in?

I.e, should I be deleting the old logs myself or should the warm
standby be managing them?

___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/

#2Darcy Buskermolen
darcyb@commandprompt.com
In reply to: Glyn Astill (#1)
Re: Stupid question about WAL archiving

On Friday 18 January 2008 09:17:10 Glyn Astill wrote:

My server ran out of disk space because my archive directory was full
ow write ahead logs.

My warm standby had lost it's mounted NFS volume and thus stopped
reading in the archives from the master.

Would I have run out of space if the standby hadn't stopped reading
them in?

I.e, should I be deleting the old logs myself or should the warm
standby be managing them?

either delete them yourself, use a cron job to delete them (something like
find . -mtime 60 -delete) , or if you are using pg_standby look at -k (which
specifies the number of old files to keep

___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

--
Darcy Buskermolen
Command Prompt, Inc.
+1.503.667.4564 X 102
http://www.commandprompt.com/
PostgreSQL solutions since 1997

#3Erik Jones
erik@myemma.com
In reply to: Glyn Astill (#1)
Re: Stupid question about WAL archiving

On Jan 18, 2008, at 11:17 AM, Glyn Astill wrote:

My server ran out of disk space because my archive directory was full
ow write ahead logs.

My warm standby had lost it's mounted NFS volume and thus stopped
reading in the archives from the master.

Would I have run out of space if the standby hadn't stopped reading
them in?

I.e, should I be deleting the old logs myself or should the warm
standby be managing them?

Depends on what you're using run your warm standby in your
recovery.conf. pg_standby has the -k flag for NUMFILESTOKEEP. Where
I work, we have a cron job that deletes WAL archives more than three
days old. Admittedly, using pg_standby's -k option is probably more
reliable.

Erik Jones

DBA | Emma®
erik@myemma.com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com

#4Glyn Astill
glynastill@yahoo.co.uk
In reply to: Erik Jones (#3)
Re: Stupid question about WAL archiving

Thanks Erik,

I'll set up a cron job to remove them for now, however I'll have a
look at pg_standby

--- Erik Jones <erik@myemma.com> wrote:

On Jan 18, 2008, at 11:17 AM, Glyn Astill wrote:

My server ran out of disk space because my archive directory was

full

ow write ahead logs.

My warm standby had lost it's mounted NFS volume and thus stopped
reading in the archives from the master.

Would I have run out of space if the standby hadn't stopped

reading

them in?

I.e, should I be deleting the old logs myself or should the warm
standby be managing them?

Depends on what you're using run your warm standby in your
recovery.conf. pg_standby has the -k flag for NUMFILESTOKEEP.
Where
I work, we have a cron job that deletes WAL archives more than
three
days old. Admittedly, using pg_standby's -k option is probably
more
reliable.

Erik Jones

DBA | Emma�
erik@myemma.com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com

__________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com

#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Glyn Astill (#4)
Re: Stupid question about WAL archiving

Glyn Astill <glynastill@yahoo.co.uk> writes:

I'll set up a cron job to remove them for now, however I'll have a
look at pg_standby

Keep in mind that if you delete a log segment that's not yet been sent
to the standby, you've hosed the standby --- you'll have to take a fresh
base backup and reload the standby with it. This is probably okay for
disaster recovery, but you don't want your script creating the disaster
all by itself.

regards, tom lane

#6Erik Jones
erik@myemma.com
In reply to: Tom Lane (#5)
Re: Stupid question about WAL archiving

On Jan 18, 2008, at 2:34 PM, Tom Lane wrote:

Glyn Astill <glynastill@yahoo.co.uk> writes:

I'll set up a cron job to remove them for now, however I'll have a
look at pg_standby

Keep in mind that if you delete a log segment that's not yet been sent
to the standby, you've hosed the standby --- you'll have to take a
fresh
base backup and reload the standby with it. This is probably okay for
disaster recovery, but you don't want your script creating the
disaster
all by itself.

Which is exactly why I pointed out that using pg_standby's -k switch
was the more reliable option.

Erik Jones

DBA | Emma®
erik@myemma.com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com

#7David Wall
d.wall@computer.org
In reply to: Erik Jones (#6)
Re: Stupid question about WAL archiving

Which is exactly why I pointed out that using pg_standby's -k switch
was the more reliable option.

And supposedly even that switch is not needed once we can get to 8.3,
which should be soon. Even the -k switch can be an issue since you
don't really know how many you should keep around.

David