Files being created under data/pg_xlog during failover testing

From: "Schoen Matthew-MSCHOEN1" <Matthew(dot)Schoen(at)motorolasolutions(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Files being created under data/pg_xlog during failover testing
Date: 2011-10-15 16:37:00
Message-ID: 4E2FEED4A5AF2E4A8678FC2D71C9C0050E080876@de01exm71.ds.mot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello Postgres community,

I am running Postgres 9.0.3 on dual node RHEL 5.5 system. I have
postgres setup to run on both nodes as active hot-standby. I am seeing a
potential issue...or hopefully I have a configuration problem.

Every time I failover the DB I am seeing wal segement files (or
checkpoint segment files) getting generated in the data/pg_xlog
directory. It doesn't seem like these files are being cleaned up and I
am concerned that with enough failovers the file system will fill up and
run out of space. Here are some of the details on the configuration that
is being used:

wal_level = hot_standby

checkpoint_segments = 8

wal_keep_segments = 8

hot_standby = on

I don't have archiving enabled. Config parameters look like the
following:

# - Archiving -

#archive_mode = off # allows archiving to be done

# (change requires restart)

#archive_command = '' # command to use to archive a logfile
segment

#archive_timeout = 0 # force a logfile segment switch after
this

# number of seconds; 0 disables

This is the failover procedure I am using:

1. Touch the failover trigger file on the standby node

2. Stop the initially active DB

3. select pg_start_backup('clone',true) on the newly active DB

4. create backup tar up necessary files/directories under data
directory, pull it over to node being recovered, and untar it in the
data directory.

5. Start the postgres as the standby server.

6. select pg_stop_backup(); on the active DB

I am running this procedure repeatedly and new 16 meg files are being
created in pg_xlog every time. Is this a know issue? Am I missing a step
to ensure that file get recycled or deleted in pg_xlog? I did look in
the archives but nothing jumped out at me. I appreciate any help that
can be provided.

Thanks,

Matt Schoen

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2011-10-15 20:20:47 9.1 got really fast ;)
Previous Message Robert Haas 2011-10-15 10:51:35 Re: [HACKERS] register creation date of table