[9.3 bug] disk space in pg_xlog increases during archive recovery

From: "MauMau" <maumau307(at)gmail(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: [9.3 bug] disk space in pg_xlog increases during archive recovery
Date: 2013-07-27 22:59:14
Message-ID: EE3325AAAB304CC7A1F57C2D0425CFEB@maumau
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Noah Misch 2013-07-27 23:03:23 Re: Proposal/design feedback needed: WITHIN GROUP (sql standard ordered set aggregate functions)
Previous Message Euler Taveira 2013-07-27 20:17:08 Re: comment for "fast promote"