Add current seek position to FDDEBUG output for FileRead,
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 17 Feb 2001 01:00:04 +0000 (01:00 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 17 Feb 2001 01:00:04 +0000 (01:00 +0000)
FileWrite, FileSeek.

src/backend/storage/file/fd.c

index cb6dfc7d508c1e7a9293850f81df6f87d6cb6d94..b0f1564fddf25657d829a64d82c2e553f1fe086c 100644 (file)
@@ -806,8 +806,9 @@ FileRead(File file, char *buffer, int amount)
 
        Assert(FileIsValid(file));
 
-       DO_DB(elog(DEBUG, "FileRead: %d (%s) %d %p",
-                          file, VfdCache[file].fileName, amount, buffer));
+       DO_DB(elog(DEBUG, "FileRead: %d (%s) %ld %d %p",
+                          file, VfdCache[file].fileName,
+                          VfdCache[file].seekPos, amount, buffer));
 
        FileAccess(file);
        returnCode = read(VfdCache[file].fd, buffer, amount);
@@ -826,8 +827,9 @@ FileWrite(File file, char *buffer, int amount)
 
        Assert(FileIsValid(file));
 
-       DO_DB(elog(DEBUG, "FileWrite: %d (%s) %d %p",
-                          file, VfdCache[file].fileName, amount, buffer));
+       DO_DB(elog(DEBUG, "FileWrite: %d (%s) %ld %d %p",
+                          file, VfdCache[file].fileName,
+                          VfdCache[file].seekPos, amount, buffer));
 
        FileAccess(file);
        returnCode = write(VfdCache[file].fd, buffer, amount);
@@ -844,8 +846,9 @@ FileSeek(File file, long offset, int whence)
 {
        Assert(FileIsValid(file));
 
-       DO_DB(elog(DEBUG, "FileSeek: %d (%s) %ld %d",
-                          file, VfdCache[file].fileName, offset, whence));
+       DO_DB(elog(DEBUG, "FileSeek: %d (%s) %ld %ld %d",
+                          file, VfdCache[file].fileName,
+                          VfdCache[file].seekPos, offset, whence));
 
        if (FileIsNotOpen(file))
        {