Files being created under data/pg_xlog during failover testing - Mailing list pgsql-general

From Schoen Matthew-MSCHOEN1
Subject Files being created under data/pg_xlog during failover testing
Date
Msg-id 4E2FEED4A5AF2E4A8678FC2D71C9C0050E080876@de01exm71.ds.mot.com
Whole thread Raw
List 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

pgsql-general by date:

Previous
From: Edson Richter
Date:
Subject: Re: 9.1 got really fast ;)
Next
From: Szymon Guz
Date:
Subject: index bloat question