From: | "MauMau" <maumau307(at)gmail(dot)com> |
---|---|
To: | "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com> |
Cc: | "Jeff Janes" <jeff(dot)janes(at)gmail(dot)com>, "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [9.3 bug] disk space in pg_xlog increases during archive recovery |
Date: | 2013-12-20 12:21:52 |
Message-ID: | 3AB3A05BACF5430F83802BA56BE05AD3@maumau |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
From: "Fujii Masao" <masao(dot)fujii(at)gmail(dot)com>
> ! if (source == XLOG_FROM_ARCHIVE && StandbyModeRequested)
>
> Even when standby_mode is not enabled, we can use cascade replication and
> it needs the accumulated WAL files. So I think that
> AllowCascadeReplication()
> should be added into this condition.
>
> ! snprintf(recoveryPath, MAXPGPATH, XLOGDIR "/RECOVERYXLOG");
> ! XLogFilePath(xlogpath, ThisTimeLineID, endLogSegNo);
> !
> ! if (restoredFromArchive)
>
> Don't we need to check !StandbyModeRequested and
> !AllowCascadeReplication()
> here?
Oh, you are correct. Okay, done.
> ! /*
> ! * If the latest segment is not archival, but there's
> still a
> ! * RECOVERYXLOG laying about, get rid of it.
> ! */
> ! unlink(recoveryPath); /* ignore any error */
>
> The similar line exists in the lower side of exitArchiveRecovery(), so
> ISTM that
> you can refactor that.
That's already done in the previous patch: deletion of RECOVERYXLOG was
moved into else clause, as in:
- /*
- * Since there might be a partial WAL segment named RECOVERYXLOG, get rid
- * of it.
- */
- snprintf(recoveryPath, MAXPGPATH, XLOGDIR "/RECOVERYXLOG");
- unlink(recoveryPath); /* ignore any error */
-
Regards
MauMau
Attachment | Content-Type | Size |
---|---|---|
wal_increase_in_pitr_v2.patch | application/octet-stream | 4.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2013-12-20 12:22:07 | Re: preserving forensic information when we freeze |
Previous Message | Robert Haas | 2013-12-20 12:12:01 | Re: preserving forensic information when we freeze |