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 1v6h3I-008Gli-Dp for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Oct 2025 03:10:48 +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 1v6h3E-00F7Yo-Tk for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Oct 2025 03:10:45 +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 1v6h3E-00F7Ya-Il for pgsql-hackers@lists.postgresql.org; Thu, 09 Oct 2025 03:10:45 +0000 Received: from mail-yx1-xb12a.google.com ([2607:f8b0:4864:20::b12a]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1v6h3C-000mDs-0W for pgsql-hackers@lists.postgresql.org; Thu, 09 Oct 2025 03:10:44 +0000 Received: by mail-yx1-xb12a.google.com with SMTP id 956f58d0204a3-63605f6f926so392643d50.0 for ; Wed, 08 Oct 2025 20:10:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1759979442; x=1760584242; darn=lists.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=dyZw2w/vFVBQif9wurE+aSOH3C+Jvoh8l+tAGSmV9z8=; b=V9Fcg/gqJdjMP9ePzP4jvtXEa2AeULlzOZQcdKZTDc2PYQLxB1TMg8AkQ3Kw5SHLNK /vk+ydmv86z+bFVAp4hnHY9GwDtcFLXTWAlgl/IouxgOxtRzCzQvp7m+Z+j4o/GtQHJ6 QbgluW57ZlnhElYJQZNXZbqu78ddRUMQK2I+pU2eH6TejSUvhJDJ4J+7XSn12XKz6LnQ noV/YMSBp1JaL+7tLpW/2lZq5HC7pVyX2gW+mLoAnUBc3N2q3WEaM1jown4rdtQE/kmL G30ZpsvJ7YeaNwjbj16iBfSwuzHODN0zAc2RTWtvfrq1qU5KWeYtg0z08calFzM6KT15 yGUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1759979442; x=1760584242; 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=dyZw2w/vFVBQif9wurE+aSOH3C+Jvoh8l+tAGSmV9z8=; b=Q7lEj5mmkxaNprUllHz0mYtSPa/gXeOC0p8DaafIBgcxQeteHFJ1kWDWkyI8om2smp kaZxQm7eJJ1//QanMkT645BoPsIH+q8CoKM5PbkxboiCO9SJec990lHFtm6YGsf6XiY1 FaiBNSlxSMulAsa963XlNxtincLu9TDYYZlnolXiTWkLpCABhcK8Q9d9UGhvVGav/n1w rWLsIWCEdEbVJE/oqQuoKMZI0xdCxVrgcgPe5NjOxKvxvFyiftELZHQg/Mm1Wr5mT9Vy osOXfmeJfHV5dReDuFY93YFOsKeCXgIL67WVangfTYn3qGl9US3FAnHd2dz625NKSzjG wrbg== X-Forwarded-Encrypted: i=1; AJvYcCVqPutc/djSAlD0YJoGrGpJRcKSRXSDo8gBYZvRQK7EI2A+xcNltK1tJLCQNogyEPSdhPsHd438W0zJPHKL@lists.postgresql.org X-Gm-Message-State: AOJu0Yzt8YJ7uS03MRx2OWmsTKDP6K/HqYo14+mmmAZUeyUnkqDLNtWN ArJ3cmA+ptIT8S/oyNlSrjNJ5gHH5nuiT++4VFECf4hDAYv4bKCOWRtajlf8zYAYxlUmpr8BlFb 9mqkV2efmUkAqbCmGemo9zMlkPuNDDI+AtiqI X-Gm-Gg: ASbGncufPw6ChM2ldnWoRiSFM/UroHd7o25VHw6roVSMhyBAwp5LK8xTgekqyAfcfxO wudn4FR7VQLgbH1nCDVBqAkL97qOkwVUht2zd2tpAJJ9IlgU5FCgOYb+2PGrKTJ3ghKnkvO1Ara QEh2Gxt8/CT2s++Vj2Q6OjEzsRJSdUKBOyvSh7Z9AOdJ4x8zCcKUiIrdOXvmrcXmCwi63yvBJ7j CV2TdzR2tv6wKj7KqsXCLAny3R8MHHl8P11NdGM+Ura X-Google-Smtp-Source: AGHT+IH/PM7Uembg2ggevhldpdt2TWhKl0GaxhYLj6RT9JkTvrsHfwRORnfv6AkB1AWWO2+OeT3b7RnKPYtn4sHzAWI= X-Received: by 2002:a05:690e:5c6:b0:638:7df:7009 with SMTP id 956f58d0204a3-63ccb8ec67bmr4402813d50.28.1759979442373; Wed, 08 Oct 2025 20:10:42 -0700 (PDT) MIME-Version: 1.0 References: <87il22cj51.fsf@163.com> <2799576.1759976008@sss.pgh.pa.us> In-Reply-To: <2799576.1759976008@sss.pgh.pa.us> From: Richard Guo Date: Thu, 9 Oct 2025 12:10:31 +0900 X-Gm-Features: AS18NWC8e1W9Wyy1SS7zvNz9z9VDbSmAuj2wieR1fqmk8Hd4N-qhLH9APRtnRWQ Message-ID: Subject: Re: Eager aggregation, take 3 To: Tom Lane Cc: Robert Haas , David Rowley , Tender Wang , Paul George , Andy Fan , PostgreSQL-development , pgsql-hackers@lists.postgresql.org, Matheus Alcantara 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 Thu, Oct 9, 2025 at 11:13=E2=80=AFAM Tom Lane wrote: > Richard Guo writes: > > On Wed, Oct 8, 2025 at 11:45=E2=80=AFPM Robert Haas wrote: > >> For what it's worth, I also don't like that field name. I'm not sure > >> what to propose instead, but I don't think apply_at is very clear. > > This field represents the set of relids at which partial aggregation > > is applied. So how about naming it partial_agg_designated_relids? > > That feels a bit verbose, though. How about partial_agg_relids or, > > for brevity, agg_relids instead? > I might be missing a subtlety here, but how about > "apply_aggregation_at" or "apply_partial_agg_at"? > > I don't think including "relids" in the field name adds anything, > given the field's declared type and comments. Fair point. 'agg' seems better to me than 'aggregation' when used in a name: it's shorter, and it's unlikely anyone would interpret it as anything other than "aggregation". I kind of wonder whether we need to include 'partial' in the name. Given the context, it seems very clear that we're referring to partial aggregation rather than final aggregation. So I'm weighing between "apply_partial_agg_at" and "apply_agg_at". - Richard