Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix function code in error report
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 6 Jun 2018 18:46:53 +0000 (14:46 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Wed, 6 Jun 2018 18:47:46 +0000 (14:47 -0400)
This bug causes a lseek() failure to be reported as a "could not open"
failure in the error message, muddling bug reports.  I introduced this
copy-and-pasteo in commit 78e122010422.

Noticed while reviewing code for bug report #15221, from lily liang.  In
version 10 the affected function is only used by multixact.c and
commit_ts, and only in corner-case circumstances, neither of which are
involved in the reported bug (a pg_subtrans failure.)

Author: Álvaro Herrera

src/backend/access/transam/slru.c

index 1f9a100da852d34e1fd3cb85ee4e3d1241813750..bf8aa7b9ea4b408eab52cffab72b31a5ddf94082 100644 (file)
@@ -597,7 +597,7 @@ SimpleLruDoesPhysicalPageExist(SlruCtl ctl, int pageno)
 
    if ((endpos = lseek(fd, 0, SEEK_END)) < 0)
    {
-       slru_errcause = SLRU_OPEN_FAILED;
+       slru_errcause = SLRU_SEEK_FAILED;
        slru_errno = errno;
        SlruReportIOError(ctl, pageno, 0);
    }