[HACKERS] fd,c just Assert()s that lseek() succeeds - Mailing list pgsql-hackers

From Tom Lane
Subject [HACKERS] fd,c just Assert()s that lseek() succeeds
Date
Msg-id 19699.1487567845@sss.pgh.pa.us
Whole thread Raw
Responses Re: [HACKERS] fd,c just Assert()s that lseek() succeeds  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I noticed while researching bug #14555 that fd.c contains two separate
cases like
vfdP->seekPos = lseek(vfdP->fd, (off_t) 0, SEEK_CUR);Assert(vfdP->seekPos != (off_t) -1);

This seems, um, unwise.  It might somehow fail to fail in production
builds, because elsewhere it's assumed that -1 means FileUnknownPos,
but it seems like reporting the error would be a better plan.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Rafia Sabih
Date:
Subject: Re: [HACKERS] Passing query string to workers
Next
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] Parallel Append implementation