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

Commit3f1e135

Browse files
committed
more verbose errors in twophase
1 parentcbcfff6 commit3f1e135

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,13 +1210,15 @@ ReadTwoPhaseFile(TransactionId xid, bool give_warnings)
12101210
stat.st_size>MaxAllocSize)
12111211
{
12121212
CloseTransientFile(fd);
1213+
fprintf(stderr,"wrong size of two-phase file \"%s\"",path);
12131214
returnNULL;
12141215
}
12151216

12161217
crc_offset=stat.st_size-sizeof(pg_crc32c);
12171218
if (crc_offset!=MAXALIGN(crc_offset))
12181219
{
12191220
CloseTransientFile(fd);
1221+
fprintf(stderr,"wrong crc offset in two-phase file \"%s\"",path);
12201222
returnNULL;
12211223
}
12221224

@@ -1243,6 +1245,7 @@ ReadTwoPhaseFile(TransactionId xid, bool give_warnings)
12431245
if (hdr->magic!=TWOPHASE_MAGIC||hdr->total_len!=stat.st_size)
12441246
{
12451247
pfree(buf);
1248+
fprintf(stderr,"muggle two-phase file \"%s\": no magic",path);
12461249
returnNULL;
12471250
}
12481251

@@ -1255,6 +1258,7 @@ ReadTwoPhaseFile(TransactionId xid, bool give_warnings)
12551258
if (!EQ_CRC32C(calc_crc,file_crc))
12561259
{
12571260
pfree(buf);
1261+
fprintf(stderr,"wrong crc32 in two-phase file \"%s\"",path);
12581262
returnNULL;
12591263
}
12601264

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp