rmgr_002.v1.patch
application/octet-stream
Filename: rmgr_002.v1.patch
Type: application/octet-stream
Part: 0
Message:
Comments on Custom RMGRs
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
Series: patch v1
| File | + | − |
|---|---|---|
| src/backend/access/transam/xlogrecovery.c | 7 | 6 |
diff --git a/src/backend/access/transam/xlogrecovery.c b/src/backend/access/transam/xlogrecovery.c
index 39ef865ed9..d67be2fa55 100644
--- a/src/backend/access/transam/xlogrecovery.c
+++ b/src/backend/access/transam/xlogrecovery.c
@@ -1626,16 +1626,17 @@ PerformWalRecovery(void)
}
if (record != NULL)
+ InRedo = true;
+
+ RmgrStartup();
+
+ if (InRedo)
{
TimestampTz xtime;
PGRUsage ru0;
pg_rusage_init(&ru0);
- InRedo = true;
-
- RmgrStartup();
-
ereport(LOG,
(errmsg("redo starts at %X/%X",
LSN_FORMAT_ARGS(xlogreader->ReadRecPtr))));
@@ -1771,8 +1772,6 @@ PerformWalRecovery(void)
}
}
- RmgrCleanup();
-
ereport(LOG,
(errmsg("redo done at %X/%X system usage: %s",
LSN_FORMAT_ARGS(xlogreader->ReadRecPtr),
@@ -1792,6 +1791,8 @@ PerformWalRecovery(void)
(errmsg("redo is not required")));
}
+ RmgrCleanup();
+
/*
* This check is intentionally after the above log messages that indicate
* how far recovery went.