Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cfgLx-0002r0-7p for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Feb 2017 05:17:37 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cfgLv-0003oH-MT for pgsql-hackers@arkaria.postgresql.org; Mon, 20 Feb 2017 05:17:35 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cfgLt-0003nQ-3z for pgsql-hackers@postgreSQL.org; Mon, 20 Feb 2017 05:17:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cfgLm-00005J-No for pgsql-hackers@postgreSQL.org; Mon, 20 Feb 2017 05:17:31 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v1K5HP4r019700 for ; Mon, 20 Feb 2017 00:17:25 -0500 From: Tom Lane To: pgsql-hackers@postgreSQL.org Subject: fd,c just Assert()s that lseek() succeeds MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <19698.1487567845.1@sss.pgh.pa.us> Date: Mon, 20 Feb 2017 00:17:25 -0500 Message-ID: <19699.1487567845@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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