aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2018-06-06 14:46:53 -0400
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2018-06-06 14:48:03 -0400
commit1d5b249310553c05e6ed1d647734d41be174e634 (patch)
tree9364e90612bbecd33e284ed7fa29a1f5faa8387a
parentb17be5b80763631b0c8f6fd6d85a12ae8d052c6f (diff)
downloadpostgresql-1d5b249310553c05e6ed1d647734d41be174e634.tar.gz
postgresql-1d5b249310553c05e6ed1d647734d41be174e634.zip
Fix function code in error report
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
-rw-r--r--src/backend/access/transam/slru.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/access/transam/slru.c b/src/backend/access/transam/slru.c
index 77edc51e1c9..e0d26b75cf4 100644
--- a/src/backend/access/transam/slru.c
+++ b/src/backend/access/transam/slru.c
@@ -614,7 +614,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);
}