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 1tjvMA-00EiK5-TG for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Feb 2025 07:15:54 +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 1tjvM9-00Dxjm-GF for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Feb 2025 07:15:53 +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 1tjvM9-00DxjY-6q for pgsql-hackers@lists.postgresql.org; Mon, 17 Feb 2025 07:15:53 +0000 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tjvM7-001GLE-0j for pgsql-hackers@postgresql.org; Mon, 17 Feb 2025 07:15:51 +0000 Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-2fc737aeeb1so886641a91.3 for ; Sun, 16 Feb 2025 23:15:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739776550; x=1740381350; 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=pEnz4uBU5BYusRjWcn1cCIuAz8oHJ3MpuAGvct/ocjc=; b=AXRAncEqQyAO7Ae9EldjYGYJFNoPeptrBmqtsAJXABDZf9SVbfrYTO/ywvJB27clKI YLvaWwiwIQKxn+syOrMyEJI1j/mvWU9FF2bQuyx7cDvQd1lf7QnSmAthGmB9/DHon5Wu 1wI632Bz13ES3h6wLG+0qarIIgB/RbeVQATzF+Qgk+aEOoKGxzKCFzf32GCOmNKNtaPK ausU+RaMFwKd+Rl+HAJ6WsFMRToH81BY6Q6xMO0vaC8CQYFjUwP8+T2q4cDBo1qVx77O 826w4/2MXKr6PjFhWzFn5A9nsaGtkp9KBiHmszQiIreu+I8CbFFmtSgsgmBR4X8NxYXN PnCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739776550; x=1740381350; 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=pEnz4uBU5BYusRjWcn1cCIuAz8oHJ3MpuAGvct/ocjc=; b=hIpZDW4kYocc86wkyZpHUK9tM8kBiyr/h1aal5rXWxoXLQW+iXqA/V2j3ub+0zNdCf kranDp1IKraWsx5V8iX0ODXtoZf7GyOxmXybIW7ipXsPLrdbTCBJ6T2+8bYGBya82pUI pFeOS92I2CCC7T3V3uW+kmn+auFLVWYLYp62fQ/adT3Z9tdkDf6voqQ9w7uVwzs25peW 98wsIdmBzb19GM9nRJ7FICVhEOTs/JVbG5R5vHyPaWCyVaeU9USCrVKyaxNJ7ebIWlE2 t6l3n4IgueTih6YPD03RXJiJ2PTEEHy0ChSe/gLI+uyLG2rkqY7obfzz9FaAvdsay8vD /nSw== X-Forwarded-Encrypted: i=1; AJvYcCXZRLju0yFvRyAr1ogOJg/jetEVQMyV5jvXySSPFWOxYnZXkU3TbuAKJVFY7G09I1VTOGEz80ed+w0qBkEs@postgresql.org X-Gm-Message-State: AOJu0YwelgjWFaXwzRZF/2xNQO1su66AjqTDFnKPOMd4L2yzcr+ENPl1 JdLlaFckPlehu3Qgh6pLYruayAfdZmDbHN9msDeLmubkIYNDgK71KfCyUtAJ97EekgxO6iDsLEt W9Y2V1a1WndOCMOmj0V9W6EBpYFE= X-Gm-Gg: ASbGnctwaWyO+657md1fDLcmvqLjggjwFoybJuyhbOA/YvzCKzAUy9T0/ATsv8hJkPk aqQq8CGRaewLDV8c1nyGt+pKXQ/A47D7+zRwMQZlxJ9QLvSFXtA3H+Giemm6b/zDIzSDnTsqomg == X-Google-Smtp-Source: AGHT+IH1YnKIjqfcVYhG+bLykjuI4ri6/kMKcDQzG0E/QUYfOTcNcTW+X+BLsUI/j4MRaYku+b5uG7PNArysku15G1I= X-Received: by 2002:a17:90b:4b4a:b0:2ee:bc1d:f98b with SMTP id 98e67ed59e1d1-2fc41153d79mr12157055a91.31.1739776550105; Sun, 16 Feb 2025 23:15:50 -0800 (PST) MIME-Version: 1.0 References: <54c35fb9-da3a-4754-ab8c-46ed0b612465@vondra.me> <684c70d7-180e-461d-9377-600c2db581ba@vondra.me> In-Reply-To: From: Amit Langote Date: Mon, 17 Feb 2025 16:15:33 +0900 X-Gm-Features: AWEUYZkZ8t6mBbKMkkrSa0L2HBssYJHM8T2Vb6pqI9OKaS7VTOY7XKn3K7Z-fYE Message-ID: Subject: Re: generic plans and "initial" pruning To: Junwang Zhao Cc: Alexander Lakhin , Tomas Vondra , Robert Haas , Alvaro Herrera , Andres Freund , Daniel Gustafsson , David Rowley , 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 Hi Junwang, On Sun, Feb 16, 2025 at 1:37=E2=80=AFPM Junwang Zhao wr= ote: > On Sat, Feb 15, 2025 at 3:51=E2=80=AFPM Amit Langote wrote: > > Thanks! It looks like I missed updating the MERGE-related lists in Modi= fyTable. > > > > I've attached a fix with a test added based on your example. I plan to > > push this on Monday. > > > > I applied the patch and the problem solved, Thanks for checking. > I have a small question that > should the following line > > ``` > if (node->mergeActionLists =3D=3D NIL) > ``` > > be changed to > > ``` > if (mtstate->mt_mergeActionLists =3D=3D NIL) > ``` > > ISTM that if we have pruned all the merge actions, there is no harm we > omit setting mtstate->mt_merge_subcommands to 0. Yeah, that seems harmless, so done. I have pushed the fix now. --=20 Thanks, Amit Langote