aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xlogutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/transam/xlogutils.c')
-rw-r--r--src/backend/access/transam/xlogutils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/backend/access/transam/xlogutils.c b/src/backend/access/transam/xlogutils.c
index 446760ed6e7..14efbf37d61 100644
--- a/src/backend/access/transam/xlogutils.c
+++ b/src/backend/access/transam/xlogutils.c
@@ -776,7 +776,7 @@ XLogReadDetermineTimeline(XLogReaderState *state, XLogRecPtr wantPage, uint32 wa
/* openSegment callback for WALRead */
static int
-wal_segment_open(XLogSegNo nextSegNo, WALSegmentContext *segcxt,
+wal_segment_open(XLogSegNo nextSegNo, WALSegmentContext * segcxt,
TimeLineID *tli_p)
{
TimeLineID tli = *tli_p;
@@ -944,7 +944,9 @@ void
WALReadRaiseError(WALReadError *errinfo)
{
WALOpenSegment *seg = &errinfo->wre_seg;
- char *fname = XLogFileNameP(seg->ws_tli, seg->ws_segno);
+ char fname[MAXFNAMELEN];
+
+ XLogFileName(fname, seg->ws_tli, seg->ws_segno, wal_segment_size);
if (errinfo->wre_read < 0)
{