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 1mcp89-0003s7-FJ for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Oct 2021 13:26:13 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mcp88-0007vl-Cz for pgsql-hackers@arkaria.postgresql.org; Tue, 19 Oct 2021 13:26:12 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mcp87-0007vM-Pc for pgsql-hackers@lists.postgresql.org; Tue, 19 Oct 2021 13:26:12 +0000 Received: from mail-ed1-x52f.google.com ([2a00:1450:4864:20::52f]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mcp83-0002rv-Mn for pgsql-hackers@postgresql.org; Tue, 19 Oct 2021 13:26:11 +0000 Received: by mail-ed1-x52f.google.com with SMTP id w19so12896430edd.2 for ; Tue, 19 Oct 2021 06:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb.com; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=T3vyJy3te3S4avv/RRV4SsZKNrGm3rejgwNXu9HOREE=; b=L42qpTMkmKWjkzzJqdGWsVsXG+lnXk1ZQU6JEqFDYTZI2M2yLXH8lFQsM3OVjNWX9q cMMDGOQACYym9T4VYwC9kI4mo2rgPAaxEjFxSScIqbg4AT6GU0HMc29TzqoKbGeB+FBx IR39Ewh2rANqTQSYZMhythGINNnjMFK1P0vIAInx20vY2+wrOR17bIZVFS1fiOIHBCXE 26reXHNG3Bx9fCWcXuiLGCPeJ5+1rt+PyM0W5mNO2BuPBfCt20kiFtFHXTqtLXDtqau/ QL//YHGj868vIwonVZReHgrNJukFOV03lHTSKFm0JRm3feHUGTl0ihVFUfPFvjRzZMcG qosg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=T3vyJy3te3S4avv/RRV4SsZKNrGm3rejgwNXu9HOREE=; b=wIS8YAJzJ7T23cpfNfyOCQ8Nm1rDSSnwbXN9BxVTkqasy+rKZDxq1x8y+DzOono8wM Da/Y7HmOoIrLYAhGnKnqx3Y+JLEVSRvy/wX8WwDj78PmsoQfHLPlTH/So4KdZF4VRshh Ih7j/1/7ygtL3xNB9ywIi/el5b+fO8sRI68iZP6Fg6UjOMl1G+/oJ3li43fFGD8W36ic 4QqUJsM+g3+/mBMhMta0prb2UKfTRCdHLXLV1Qa2nSBDcJ3lEx38B2AACIj2+x+B/p+O GLf4MH4KcTjchmo0yQNnD91J9Yekz+xPGclQkL6fQxlRLl6/rNdC8R8LmHquNW7wuuaX x30Q== X-Gm-Message-State: AOAM533WJ+wpNWHMrryzJTAtR1NpdRLIsGIkee6yLEFFUjzYy3lwbq1t dLivxWZ6aZuTNuLAhCVHyhNrN/dwo1O9nGORDf19dmXwCf6MIQOAF2LxRpt0XYeUkiW3luB/01P qaXLKaj8Iy92a0UqmDqFlG2CainJvwalhPRcbx/caxIfkST9FnDHHN3P0xfxljWzCFgO3DZxbJn u3aGCd2ttROOdi46d49tr42PjSsJPFM8FVk97l X-Google-Smtp-Source: ABdhPJxPg0wsxndYQJA4xxmapBA4Eu18jKBrmZK9VgJGiqL3rerMRhUrMXcJjm4JxjLEZMraBVswzg== X-Received: by 2002:aa7:cac2:: with SMTP id l2mr53455211edt.168.1634649954226; Tue, 19 Oct 2021 06:25:54 -0700 (PDT) Received: from [10.137.0.18] (static-84-42-175-93.net.upcbroadband.cz. [84.42.175.93]) by smtp.gmail.com with ESMTPSA id z18sm10093114ejl.67.2021.10.19.06.25.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Oct 2021 06:25:53 -0700 (PDT) Message-ID: <504e576d-984f-d73c-2694-8ee9624f8def@enterprisedb.com> Date: Tue, 19 Oct 2021 15:25:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 Subject: Re: Partial aggregates pushdown Content-Language: en-US To: Alexander Pyhalov Cc: pgsql-hackers@postgresql.org References: <2486a6db3f068efb97c1277c23402e0d@postgrespro.ru> From: Tomas Vondra In-Reply-To: <2486a6db3f068efb97c1277c23402e0d@postgrespro.ru> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/19/21 08:56, Alexander Pyhalov wrote: > Hi. > > Tomas Vondra писал 2021-10-15 17:56: >> As for the proposed approach, it's probably good enough for the first >> version to restrict this to aggregates where the aggregate result is >> sufficient, i.e. we don't need any new export/import procedures. >> >> But it's very unlikely we'd want to restrict it the way the patch does >> it, i.e. based on aggregate name. That's both fragile (people can >> create new aggregates with such name) and against the PostgreSQL >> extensibility (people may implement custom aggregates, but won't be >> able to benefit from this just because of name). >> >> So for v0 maybe, but I think there neeeds to be a way to relax this in >> some way, for example we could add a new flag to pg_aggregate to mark >> aggregates supporting this. >> > > Updated patch to mark aggregates as pushdown-safe in pg_aggregates. > > So far have no solution for aggregates with internal aggtranstype. Thanks. Please add it to the next CF, so that we don't lose track of it. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company