Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3354746

Browse files
committed
Report any XLogReadRecord() error in XlogReadTwoPhaseData().
Buildfarm members kittiwake and tadarida have witnessed errors at thissite. The site discarded key facts. Back-patch to v10 (all supportedversions).Reviewed by Michael Paquier and Tom Lane.Discussion:https://postgr.es/m/20211107013157.GB790288@rfd.leadboat.com
1 parent42f9427 commit3354746

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

‎src/backend/access/transam/twophase.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,10 +1397,18 @@ XlogReadTwoPhaseData(XLogRecPtr lsn, char **buf, int *len)
13971397
record=XLogReadRecord(xlogreader,&errormsg);
13981398

13991399
if (record==NULL)
1400-
ereport(ERROR,
1401-
(errcode_for_file_access(),
1402-
errmsg("could not read two-phase state from WAL at %X/%X",
1403-
LSN_FORMAT_ARGS(lsn))));
1400+
{
1401+
if (errormsg)
1402+
ereport(ERROR,
1403+
(errcode_for_file_access(),
1404+
errmsg("could not read two-phase state from WAL at %X/%X: %s",
1405+
LSN_FORMAT_ARGS(lsn),errormsg)));
1406+
else
1407+
ereport(ERROR,
1408+
(errcode_for_file_access(),
1409+
errmsg("could not read two-phase state from WAL at %X/%X",
1410+
LSN_FORMAT_ARGS(lsn))));
1411+
}
14041412

14051413
if (XLogRecGetRmid(xlogreader)!=RM_XACT_ID||
14061414
(XLogRecGetInfo(xlogreader)&XLOG_XACT_OPMASK)!=XLOG_XACT_PREPARE)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp