Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zi7v2-0003nI-SZ for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Oct 2015 21:31:08 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zi7v2-0004QG-Dl for pgsql-hackers@arkaria.postgresql.org; Fri, 02 Oct 2015 21:31:08 +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) (envelope-from ) id 1Zi7ti-0002m7-JO for pgsql-hackers@postgresql.org; Fri, 02 Oct 2015 21:29:46 +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) (envelope-from ) id 1Zi7tg-0006x2-7x for pgsql-hackers@postgresql.org; Fri, 02 Oct 2015 21:29:45 +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 t92LTcGA005583; Fri, 2 Oct 2015 17:29:38 -0400 From: Tom Lane To: Peter Geoghegan cc: Jim Nasby , Pg Hackers Subject: Re: Less than ideal error reporting in pg_stat_statements In-reply-to: References: <5601D354.5000703@BlueTreble.com> <15898.1442965225@sss.pgh.pa.us> Comments: In-reply-to Peter Geoghegan message dated "Fri, 02 Oct 2015 14:04:59 -0700" Date: Fri, 02 Oct 2015 17:29:38 -0400 Message-ID: <5582.1443821378@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 Peter Geoghegan writes: > It would be nice to get this committed before the next point releases > are tagged, since I've now heard a handful of complaints like this. I'm not too impressed with this bit: /* Allocate buffer; beware that off_t might be wider than size_t */ - if (stat.st_size <= MaxAllocSize) + if (stat.st_size <= SIZE_MAX) buf = (char *) malloc(stat.st_size); because there are no, zero, not one uses of SIZE_MAX in our code today, and I do not see such a symbol required by the POSIX v2 spec either. Perhaps this will work, but you're asking us to introduce a brand new portability hazard just hours before a wrap deadline. That is not happening. Other than that, this seems roughly sane, though I've not read it in detail or tested it. Does anyone have an objection to trying to squeeze in something along this line? 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