[9.3 bug] disk space in pg_xlog increases during archive recovery - Mailing list pgsql-hackers

From MauMau
Subject [9.3 bug] disk space in pg_xlog increases during archive recovery
Date
Msg-id EE3325AAAB304CC7A1F57C2D0425CFEB@maumau
Whole thread Raw
Responses Re: [9.3 bug] disk space in pg_xlog increases during archive recovery
List pgsql-hackers
Hello,

I'm sorry I've been touching several things recently before fixing any of 
them.

I've noticed undesirable disk space increase while performing archive 
recovery with PostgreSQL 9.3.  This happens with 9.2, too.

I just performed archived recovery with the following parameters in 
recovery.conf.  I'm not using replication.

restore_command = 'cp ...'
recovery_target_timeline = 'latest'

As the archive recovery progresses, the disk space used by $PGDATA/pg_xlog 
increases.  It seems that restored archive WAL files are accumulated there. 
This is considerable amount depending on the number of archived WAL files. 
In my case, the recovery failed because of the shortage of disk space.  This 
did not happen with 9.1

The cause appears to be KeepFileRestoredFromArchive().  This function saves 
restored archive WAL files in pg_xlog/.  I guess this is for cascading 
replication, a new feature added in 9.2.
So, I think it is a bug that the disk space increases if not using cascading 
replication.  Those who migrated from 9.1 and do not use 9.2 features would 
be surprised like me.


Do you think this should be fixed?  How should it be fixed?  If possible, 
could you fix it in the next minor release?  If you all are busy, I'll try 
to fix it, but give me advice how to do that.

Regards
MauMau





pgsql-hackers by date:

Previous
From: Euler Taveira
Date:
Subject: Re: comment for "fast promote"
Next
From: Noah Misch
Date:
Subject: Re: Proposal/design feedback needed: WITHIN GROUP (sql standard ordered set aggregate functions)