Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jOtvT-00055l-Fl for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Apr 2020 02:06:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jOtvR-0005Px-Cj for pgsql-bugs@arkaria.postgresql.org; Thu, 16 Apr 2020 02:06:45 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jOtvR-0005Pi-4F for pgsql-bugs@lists.postgresql.org; Thu, 16 Apr 2020 02:06:45 +0000 Received: from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jOtvP-0000b8-0U for pgsql-bugs@lists.postgresql.org; Thu, 16 Apr 2020 02:06:44 +0000 Received: by mail-pf1-x432.google.com with SMTP id k15so942636pfh.6 for ; Wed, 15 Apr 2020 19:06:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W282oaJFGFwBdhEMY+7MjNEDDa+D2f71DoEHLDyfKgw=; b=bLbeXj6JFM9COfrDEDXoGi5sR2Gago/HwhvEiyifow/3vfZSE3gj49fjXnjWiiHSnH iSNHcarfegacMEjW4DcNGAXp24z7QCB+G3X5DyxMwd1GZmpIDhYYcsZLrZFB9CJ/qdwO 4cXR2J9fiikc8KikkFof51MlVc7+D/hTDZmpAyWuHaiM4ObXu8TR2TgiYbBv/qlGPHNw 4ia8I7gQ9hZYmVQRuY5djx/IDYWCMnHLJcpZg5IISpw74B97m6BoGrW1sna+pQ4NCo7n heRt6cVBp/p8vFhbRVwbae0+fxtWhQ/erLfwcTILteq6deu+hLZHhgd8QhaFnnjfy+Ss 2cRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W282oaJFGFwBdhEMY+7MjNEDDa+D2f71DoEHLDyfKgw=; b=FMrjQPemCCIw+hKuI3tJd1ZX8H8w/4feCoT4USoPX4+WSYWg7ewqHaI6IFfq3et3Li NnZTsNS8mKg4nc2N88FrsdXAwThnlt6zZ2+qqZlQkwhdOyB3oxVj8U0M6IECfox9lteF Mp8EFTf2a9K0gQw5h63/YHBruyQS3wdaQHe/MwOLF3MxLUDKgHlvgt3rV6poMiUAvfvK ORJ/KlNVDqm6cVV+o/YmHEoK5ZXe1EVATSRtcQ4GSdMpM4qJ3RqpvmGTbBtXwbi7+Jph yiEo0ZropYMz7ahoTULX6JnE4eOw7Cfg8lUewInLgRPx+uVZQKqoyBBFNrlqvo+fw9Qj 3Cgg== X-Gm-Message-State: AGi0PuZGAPEIvoj+hPxnBOijYrs4js0+Unzz49N+c3tHVYQEGbXYY/Xc v4prl8blhB9YU2Z9irk80+c= X-Google-Smtp-Source: APiQypI9B/ayoaBCg8EDgEOyrMhtOrdYl0psCprOil6sYlSIMJ4znq+B4KCPdjVjT5IlZhF90diKlw== X-Received: by 2002:aa7:8d06:: with SMTP id j6mr4464804pfe.237.1587002801051; Wed, 15 Apr 2020 19:06:41 -0700 (PDT) Received: from hammer.magicstack.net ([52.119.126.69]) by smtp.gmail.com with ESMTPSA id a1sm15138176pfl.188.2020.04.15.19.06.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Apr 2020 19:06:40 -0700 (PDT) From: Elvis Pranskevichus To: "David G. Johnston" , Tom Lane Cc: PostgreSQL mailing lists Subject: Re: BUG #16368: Incorrect function inlining in the presence of a window function Date: Wed, 15 Apr 2020 19:06:39 -0700 Message-ID: <2352640.BRP1sDCPNr@hammer.magicstack.net> In-Reply-To: <2039.1586996045@sss.pgh.pa.us> References: <16368-0dd1d5ab02a3cbc0@postgresql.org> <2039.1586996045@sss.pgh.pa.us> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk > The particular case mentioned there seems to be about the same as > here: constant-folding happens even in CASE arms that will never be > reached at runtime. Since the actual issue here is false positive exceptions, why can't we treat errors raised during const eval as a signal to cancel the constant folding, i.e. ignore them and keep the failing expression unoptimized? Elvis