pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-hackers@postgreSQL.org
Subject: fd,c just Assert()s that lseek() succeeds
Date: Mon, 20 Feb 2017 00:17:25 -0500
Message-ID: <19699.1487567845@sss.pgh.pa.us> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (2+ messages)  latest in thread

Message-ID: <19699.1487567845@sss.pgh.pa.us>
Permalink:  ../19699.1487567845@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19699.1487567845@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: fd,c just Assert()s that lseek() succeeds
  In-Reply-To: <19699.1487567845@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox