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 1qdXF3-003o9n-8i for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Sep 2023 14:41:21 +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 1qdXF1-002hEG-Tu for pgsql-hackers@arkaria.postgresql.org; Tue, 05 Sep 2023 14:41:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qdXF1-002hE8-Jl for pgsql-hackers@lists.postgresql.org; Tue, 05 Sep 2023 14:41:19 +0000 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1qdXEy-002spc-4R for pgsql-hackers@postgresql.org; Tue, 05 Sep 2023 14:41:18 +0000 Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-500a398cda5so4478861e87.0 for ; Tue, 05 Sep 2023 07:41:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693924874; x=1694529674; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+AF3q2kqmrqafQq8wR9yctLnmoo8PgMmF/AUO2GeLdQ=; b=g45JX+aePRN9KJZ3eoWroDjIjKo7IyGOEkdZIx3TjFR5rODiPOxo2r21AbJz8wvY/r 4/x3YD95W03GLEGKPuG4ULFcHJYwtNwks3YK9Y49zqWQH+eENSEVxA0tmAbyjBcNxUZh SQLYLPm+w58p5Gu6gzAkIJpmKOA/cSW36Hx354Q2XX/RheDBlXS9jMgTMgizuEcYdpZz JN9CpAk9lj/CDN4XXnYGP4OvDZVX+RGeMVJOy10x+kmz8FvgqCZmbpjPB2NwxAIWbJeF Rxp4t8Waqo1U6YHM+x+85ALZCZ2K1mDI7jMqyICF3eBvekqmYdSTBFWL4nNm6/ex/Zxv CyuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693924874; x=1694529674; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+AF3q2kqmrqafQq8wR9yctLnmoo8PgMmF/AUO2GeLdQ=; b=NBw89lle3qvOIVQ9AbirFH+KDqYoafj5OSMyCzlOkeZLJo9T029OesFgLjrsT0O4ZF ku0ocsFfwKzFrQH/wajn0Km3rS7XZSJH5MwMkPhOZPWomPb8lRG7UpX2ObYoEN3gAfCI DzME33DHggIpSq6xNM7GiMpvirSvghEWTDJfcHQR37oKpJlZ++4IrnShe4VAUzUx9mO2 eRKryr9twKwf+2r1e1JOjqlLe+16gRyxA4QKPBG0Tk4X78Pju0Ur2lDhnOzuiFy5gQV/ Cs1LVI8cHPjqrxaK+cjMPurvovpCV4JaDVd1u58VApwYsOddVaJggphelF/GUTO84CIF 1pZw== X-Gm-Message-State: AOJu0YyuWIQM90NJfVLLY6P71BXJqphr4of+mqf4uO8V1GzLo1XHq+JA n/oELcjZGYEH5clE756mnQENk0aR9s2X32xCoIc= X-Google-Smtp-Source: AGHT+IHsRApFKYfcoWO75K46VTKTl6PETHnNpQOn8KC74lWTer8MHkEIpV2gBjgUQmac2mLs5HxcLCv4yQaxKw1D9PI= X-Received: by 2002:ac2:4ecc:0:b0:501:2071:6784 with SMTP id p12-20020ac24ecc000000b0050120716784mr39283lfr.10.1693924873861; Tue, 05 Sep 2023 07:41:13 -0700 (PDT) MIME-Version: 1.0 References: <20221221101846.7zsi7lscnm5ediik@alvherre.pgsql> <1350682.1671635927@sss.pgh.pa.us> <4191508.1674157166@sss.pgh.pa.us> <349124.1674185509@sss.pgh.pa.us> <20230207180855.xy5m4puwh5gzd7xy@awork3.anarazel.de> <1274885.1680558101@sss.pgh.pa.us> <9D23D8BB-83EE-451E-95C1-CF42ADB76869@yesql.se> In-Reply-To: From: Robert Haas Date: Tue, 5 Sep 2023 10:41:02 -0400 Message-ID: Subject: Re: generic plans and "initial" pruning To: Amit Langote Cc: Alvaro Herrera , Andres Freund , Daniel Gustafsson , David Rowley , Jacob Champion , PostgreSQL Hackers , Thom Brown , Tom Lane Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue, Sep 5, 2023 at 3:13=E2=80=AFAM Amit Langote wrote: > Attached 0001 removes unnecessary cleanup calls from ExecEnd*() routines. It also adds a few random Assert()s to verify that unrelated pointers are not NULL. I suggest that it shouldn't do that. The commit message doesn't mention the removal of the calls to ExecDropSingleTupleTableSlot. It's not clear to me why that's OK and I think it would be nice to mention it in the commit message, assuming that it is in fact OK. I suggest changing the subject line of the commit to something like "Remove obsolete executor cleanup code." > 0002 adds NULLness checks in ExecEnd*() routines on some pointers that > may not be initialized by the corresponding ExecInit*() routines in > the case where it returns early. I think you should only add these where it's needed. For example, I think list_free_deep(NIL) is fine. The changes to ExecEndForeignScan look like they include stuff that belongs in 0001. Personally, I prefer explicit NULL-tests i.e. if (x !=3D NULL) to implicit ones like if (x), but opinions vary. --=20 Robert Haas EDB: http://www.enterprisedb.com