Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1txP1R-008YuA-HT for pgsql-general@arkaria.postgresql.org; Wed, 26 Mar 2025 11:34:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1txP1Q-0025hb-7R for pgsql-general@arkaria.postgresql.org; Wed, 26 Mar 2025 11:34:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1txP1P-0025hQ-SU for pgsql-general@lists.postgresql.org; Wed, 26 Mar 2025 11:34:11 +0000 Received: from mail-yb1-xb30.google.com ([2607:f8b0:4864:20::b30]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1txP1N-001HiN-2R for pgsql-general@lists.postgresql.org; Wed, 26 Mar 2025 11:34:11 +0000 Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-e63c3a53a4cso4943954276.2 for ; Wed, 26 Mar 2025 04:34:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1742988848; x=1743593648; darn=lists.postgresql.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=RuNto+uxMegzx5DwFgdWdNsSCpN4lVMFOkE6uebLjho=; b=gvgr3Q200iAMpME7ZNj6k6hTDGXptunH7lCp3WlI0yOIv8MdfCfNAxZ3eWrXgla22j v+wZKgWDrScGpDTThFmXpNJgjZAefCZw8aodTDhnvVkveTriFU6hl1ylK0c6ksZ42jsn xeqRKBGwt3RNQhfzaJV1zWrlf0f9dDqho/AM+WM5/FvsGWN91kRZSK9QUolTQrJ98Sc5 2/BpMoBuImTmw6xaXKf1eRkgZ8jd+zXWEmSq0Feyb72+W4HK2AEWBhd/bFKNYYWZVD+F TKbK9o0tCkG+yIxC0EbL7xmpG2ptbwkjhwWtAIZdLBi1p6xrJdqP7lGL3247NsAasSka cSDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742988848; x=1743593648; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RuNto+uxMegzx5DwFgdWdNsSCpN4lVMFOkE6uebLjho=; b=hyXVO5xF0E/IsiHYj/9SwdG6w53rZ+Jw5B9RlGe/Fp9/00/tKMVSbtoCUeFF2EKlFo Vf8szAfyTNH43f2Xi0gofIEKsWiXbvEf4wbQOD7CdDn0ijLQH4Se8hoAT4efZ25ILobp DvwdwoUkFj3zq9jQ/tE+YHmxkLvVX4g/LpxpgKpP8DW+rV/qv5mlYBEbA2o7XYongluf lgapr2Yok6AwuNyrUcVQMYejSzZ0CMpxks0tPNa5JM9xpUcr222HuM7xWdfn25wk9NAy qriJRX2GUL0VHywc+8adIOOBxeXVcTMA6qHy3/BxQALB1IzWILYvypRdNJga6dGZi7bI ub+g== X-Gm-Message-State: AOJu0Yw1uhhI/fu61btkWI9c76El0pIRIw18RQYQ/JoxSDEMz2mRVQjK o+XACg775Bylc1oJWvFjbIAp9wn8q1TCZ1fRFI8XgTnb2S/2G4q+pPOizlzwGL+6MuQtty1OlCz nE5+EOcm5VWmGnrDVvFI+xo3VXufWtGcG67AOSA== X-Gm-Gg: ASbGncvRIgEEm+t2ga8QpTKV2H56sYy++M17wYLPpHpThrv+c7eGbPlJqlV/s+MYYhX Pr5DJeDL3eWxis7aU45UfEIYk4l1J0R9oak17UPO1hDJhUvmihaqoO0hLGElzt+VAoAgEacVBN4 RnJ+CcQ/vzZVhphsf1WppL7Ys8 X-Google-Smtp-Source: AGHT+IER6RHsWvjZZzMnfiNKIHEER8CQ+4J/Cv2XSHhL9tHT/ZEjXZSs0TewkmaZYt4tJLNL8CkmOhdRschLjyCqBz4= X-Received: by 2002:a05:6902:2848:b0:e63:49ad:c496 with SMTP id 3f1490d57ef6-e66a4fa6a4cmr26614945276.49.1742988847770; Wed, 26 Mar 2025 04:34:07 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?B?0JXQs9C+0YAg0JHRg9C00Y7QutC40L0=?= Date: Wed, 26 Mar 2025 14:33:56 +0300 X-Gm-Features: AQ5f1JqmOYtDhBnRWxl3ig5fYkLfpesObH6TBZlDqUDScBN6u7h45QfJL09RAn8 Message-ID: Subject: Confusion on Assert() definition To: pgsql-general@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi all! There's something about the definition of Assert() in postgres that I don't really understand. Refering to src/include/c.h, if USE_ASSERT_CHECKING is not defined, Assert() is defined to be always true regardless of FRONTEND? Additionally, I lack understanding of why Assert() is meant to only be used for debugging when it has a lot of potential at error intercepting. PipelineDB, for example, has a risk of few null dereferences because of disabled Assert(). It bugs me that I can't get over something seemingly obvious, so I'd be very grateful for clarification! Best regards, Egor Budyukin, confused static analysis specialist.