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 1ohdrl-00089G-N5 for pgsql-hackers@arkaria.postgresql.org; Sun, 09 Oct 2022 21:29:45 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ohdrj-0005NH-QL for pgsql-hackers@arkaria.postgresql.org; Sun, 09 Oct 2022 21:29:43 +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 1ohdrj-0005Kr-Ex for pgsql-hackers@lists.postgresql.org; Sun, 09 Oct 2022 21:29:43 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ohdrh-0002Iq-JE for pgsql-hackers@lists.postgresql.org; Sun, 09 Oct 2022 21:29:43 +0000 Received: by mail-pl1-x631.google.com with SMTP id x6so8819618pll.11 for ; Sun, 09 Oct 2022 14:29:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=IA5CJl3giMjD1USHO0GY/s0TE5FrsUqIx6VLkG4dvKw=; b=Fi88uiRrTcOjdIWogwdx+vFG0GB68M10h3X/Z7DN8V0VhiNkMq3G+cFih+ONRdKOsU /O1EVBvIodb5oYI6Ivv76TqMjBWBNTswBpEvcslzlOPhysCxZ33JkjPl8yPqXCMM+5Qc cjVZTaXP9HQhVFWesth5yt1JCFiGrZmSc8VLv1ANrA02NEHbQHxHFGpv5f14HS7HDeoC gRcWoNAKEae5yYppa8shuzPpK61spDFPCx4BjtRj4RcQuLWfxFp3WMuwdU40511yJLoY jsxlkMH42RdiLBnxYaQfiE/jyEAkIw4xTk2taualoOVwAXNAAiX2r67mm38bBR3cAsJH dEVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IA5CJl3giMjD1USHO0GY/s0TE5FrsUqIx6VLkG4dvKw=; b=b9dAwgR5Zku5+cYrjUs4JNPU/Ey2RC4qk29nx8GH6uEpIKW1lXXNnfZyeTMsFE0TnZ Ya/lHjLFnpRfmQh0K8wdbBzNSYB5yuhCgWCCRyb0Ckhm7JJlf7dF8/Ukp1VwNxKw+ap+ hU3SXRiEiDFjCmSbtkCJS/fQioGcPNDu0mTRtTV+OwUCxFJc3pPCYlyq/0/iDpm17auB Vl2VCMC6pt5j6dnAnb0toGpsYq902jKvX7v20u/Z8WmD+IsxnOum+k8pCYcq4+MJgAAK xMBXlS7+tl0UbqipHQoIKQ2WxxUQ9S2fs8A5YqQnJ752MAazj8WmljWkWu49SymcX7/D vJCw== X-Gm-Message-State: ACrzQf0eb42dOQgOHI8ru4TugA71qEBylUfefX7YbKWHlyZVXFUigRKs 7ytl1oP8CE1Kg+BPxkp3c18= X-Google-Smtp-Source: AMsMyM6sBh8rho1FeJqiB9b7/38bhG36VosekWGGFiOl+UFHrko82EgQtPrRGmMKBK56H1vN/IMKtQ== X-Received: by 2002:a17:90a:e7ca:b0:20a:966e:8480 with SMTP id kb10-20020a17090ae7ca00b0020a966e8480mr27869537pjb.100.1665350979333; Sun, 09 Oct 2022 14:29:39 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id x9-20020a170902a38900b0017f9db0236asm5136941pla.82.2022.10.09.14.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Oct 2022 14:29:38 -0700 (PDT) Date: Sun, 9 Oct 2022 14:29:37 -0700 From: Nathan Bossart To: Tom Lane Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Simplifying our Trap/Assert infrastructure Message-ID: <20221009212937.GC900071@nathanxps13> References: <3928703.1665345117@sss.pgh.pa.us> <20221009210148.GA900071@nathanxps13> <3943009.1665349719@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3943009.1665349719@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, Oct 09, 2022 at 05:08:39PM -0400, Tom Lane wrote: > Something I thought about but forgot to mention in the initial email: > is it worth sprinkling these macros with "unlikely()"? I think that > compilers might assume the right thing automatically based on noticing > that ExceptionalCondition is noreturn ... but then again they might > not. Of course we're not that fussed about micro-optimizations in > assert-enabled builds; but with so many Asserts in the system, it > might still add up to something noticeable if there is an effect. I don't see why not. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com