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 1oqxUl-0004Hk-R6 for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Nov 2022 14:16:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oqxUk-0007JM-AL for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Nov 2022 14:16:30 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oqxUj-0007JD-9a for pgsql-hackers@lists.postgresql.org; Fri, 04 Nov 2022 14:16:29 +0000 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1oqxUW-0001jr-M1 for pgsql-hackers@lists.postgresql.org; Fri, 04 Nov 2022 14:16:28 +0000 Received: by mail-wm1-x335.google.com with SMTP id h125-20020a1c2183000000b003cf9c3f3b80so554846wmh.0 for ; Fri, 04 Nov 2022 07:16:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:comments:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=y9iv/jNvcIXNRP9q03ft1lRYEI7zWMx/rIqVMmRW5gY=; b=RoXPSFy+ocCWj/9bwZ7xeOX2qlyuTjPiSOaQvt66z0RZ8QFFXnEzjj99cZwCJk8/wk T38NQn9z/qSWbtdE6qRPrCYzg96SWQneQG/RhSZ/j+yYxAsSZMUxLkb+BLo8lYMh1tid XYbzJJUkBZV8s7SUSPSltIxedbK95CAEKpxCyfCVAjJc3XLY/+hc3fYLjoPxviH4BCow S5vB0Rgx07TRLUr4jJKoVknz6Yz+FsTlltaS8jsaWWmV8rGqomRUefGPw1DCZ09ao9RF Uv194JY2TS+bI27vhL9g0+jKWyBPJtZQDlrZHgjrttCV18mwMoviKkQXzolF3yK9Zqpb 2lNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:mime-version:comments:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=y9iv/jNvcIXNRP9q03ft1lRYEI7zWMx/rIqVMmRW5gY=; b=WRzP13yDjk9LLxmwKpyh47JfKXCIx5ZuRRczgTgBe3eu523wx40fZ//Ypu0QiRAp8Z F3PJ2BKcaLwgNjfpNiI5ybHnoH26guO6qysw3fwOpbtTTenqrBB7QFWsXqMPACQfNuY/ mUrBNdX8go2+PeHNwTWE3PEpCJ9hVqJk1btWRT7DgDrssCL4oh3vNFhmF7MLZknnARYw YLSrBspLX9CYeH/XQCzXPIPpmStGk4YkWWL235MstMX/QjyWF9oMqoVTsPhZdzXz7iVe 1rl0wmBvhBsaDnxLS34QmW6A0C/y/sJgCxJH5hITyybHhEFJRxQCUYEJB70t065DuYdT PDCg== X-Gm-Message-State: ACrzQf2tQU4rB0YSx74o4zyMfXWuo4xHK0gVkT6Am51CdU6gJhA+3KRC 22nyWS88kyxocvwVebh1SmOyYQ== X-Google-Smtp-Source: AMsMyM5w7UJlh/tIFKpQhEU9QJUWrjdwe1MfF6AcIvMPvZym28+4lLX+NWpCKfCDxxI/NeNKRXV3RQ== X-Received: by 2002:a05:600c:3d9a:b0:3cf:4969:850f with SMTP id bi26-20020a05600c3d9a00b003cf4969850fmr23771442wmb.130.1667571374072; Fri, 04 Nov 2022 07:16:14 -0700 (PDT) Received: from antos ([88.103.134.65]) by smtp.gmail.com with ESMTPSA id m6-20020a1c2606000000b003c6edc05159sm3031905wmm.1.2022.11.04.07.16.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 07:16:12 -0700 (PDT) From: Antonin Houska To: Tomas Vondra cc: "Fujii.Yuki@df.MitsubishiElectric.co.jp" , "pgsql-hackers@lists.postgresql.org" , "david@pgmasters.net" , "tgl@sss.pgh.pa.us" , "zhihui.fan1213@gmail.com" , "legrand_legrand@hotmail.com" , "daniel@yesql.se" Subject: Re: WIP: Aggregation push-down - take2 In-reply-to: References: Comments: In-reply-to Tomas Vondra message dated "Mon, 31 Oct 2022 20:00:20 +0100." X-Mailer: MH-E 8.6+git; nmh 1.7+dev; GNU Emacs 27.2.50 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Date: Fri, 04 Nov 2022 15:17:15 +0100 Message-ID: <89085.1667571435@antos> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=-=-= Content-Type: text/plain Tomas Vondra wrote: > Hi, > > On 7/12/22 08:49, Fujii.Yuki@df.MitsubishiElectric.co.jp wrote: > > Hi everyone. > > > > I rebased the following patches which were submitted in [1]. > > v17-0001-Introduce-RelInfoList-structure.patch > > v17-0002-Aggregate-push-down-basic-functionality.patch > > v17-0003-Use-also-partial-paths-as-the-input-for-grouped-path.patch > > > > I checked I can apply the rebased patch to commit 2cd2569c72b8920048e35c31c9be30a6170e1410. > > > > I'm going to register the rebased patch in next commitfest. > > > I've started looking at this patch series again, but I wonder what's the > plan. The last patch version no longer applies, so I rebased it - see > the attachment. The failures were pretty minor, but there're two warnings: > > pathnode.c:3174:11: warning: variable 'agg_exprs' set but not used > [-Wunused-but-set-variable] > Node *agg_exprs; > ^ > pathnode.c:3252:11: warning: variable 'agg_exprs' set but not used > [-Wunused-but-set-variable] > Node *agg_exprs; > ^ > > so there seem to be some loose ends. Moreover, there are two failures in > make check, due to plan changes like this: > > + Finalize GroupAggregate > Group Key: p.i > - -> Nested Loop > - -> Partial HashAggregate > - Group Key: c1.parent > - -> Seq Scan on agg_pushdown_child1 c1 > - -> Index Scan using agg_pushdown_parent_pkey on ... > - Index Cond: (i = c1.parent) > -(8 rows) > + -> Sort > + Sort Key: p.i > + -> Nested Loop > + -> Partial HashAggregate > + Group Key: c1.parent > + -> Seq Scan on agg_pushdown_child1 c1 > + -> Index Scan using agg_pushdown_parent_pkey on ... > + Index Cond: (i = c1.parent) > +(10 rows) > > This seems somewhat strange - maybe the plan is correct, but the extra > sort seems unnecessary. > > However, maybe I'm confused/missing something? The above message says > v17 having parts 0001-0003, but there's only one patch in v18. So maybe > I failed to apply some prior patch? I've rebased the last version I had on my workstation (v17), the regression tests just worked. Maybe v18 was messed up. v20 is attached. -- Antonin Houska Web: https://www.cybertec-postgresql.com --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=v20-0001-Introduce-RelInfoList-structure.patch