Skip to content

Commit 020258a

Browse files
committed
Fix error message for CFS
1 parent eb2ea8d commit 020258a

File tree

1 file changed

+6
-2
lines changed
  • src/backend/storage/file

1 file changed

+6
-2
lines changed

src/backend/storage/file/fd.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1749,8 +1749,12 @@ FileRead(File file, char *buffer, int amount)
17491749
{
17501750
if (errno != EINTR)
17511751
{
1752-
elog(LOG, "Failed to read block %u position %u size %u from compressed file %s: %m",
1753-
(uint32)(VfdCache[file].seekPos / BLCKSZ), (uint32)seekPos, size, VfdCache[file].fileName);
1752+
if (returnCode == 0)
1753+
elog(LOG, "Block %u position %u size %u is beyond end of compressed file %s",
1754+
(uint32)(VfdCache[file].seekPos / BLCKSZ), (uint32)seekPos, size, VfdCache[file].fileName);
1755+
else
1756+
elog(LOG, "Failed to read block %u position %u size %u from compressed file %s: %m",
1757+
(uint32)(VfdCache[file].seekPos / BLCKSZ), (uint32)seekPos, size, VfdCache[file].fileName);
17541758
cfs_unlock_file(map);
17551759
return returnCode;
17561760
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy