Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j4d56-0005Bq-VP for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Feb 2020 04:04:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1j4d55-0008FS-Ga for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Feb 2020 04:04:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1j4d55-0008FL-42 for pgsql-hackers@lists.postgresql.org; Thu, 20 Feb 2020 04:04:55 +0000 Received: from mx0a-00296801.pphosted.com ([148.163.150.38]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j4d4x-0001z8-MZ for pgsql-hackers@postgresql.org; Thu, 20 Feb 2020 04:04:53 +0000 Received: from pps.filterd (m0114583.ppops.net [127.0.0.1]) by mx0a-00296801.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 01K3wkwd024784 for ; Thu, 20 Feb 2020 04:04:45 GMT Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-00296801.pphosted.com with ESMTP id 2y8ub698wg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 20 Feb 2020 04:04:45 +0000 Received: by mail-pj1-f70.google.com with SMTP id d7so409345pjx.6 for ; Wed, 19 Feb 2020 20:04:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=+1WNY8eODq5d3xX6PjMwmnLMOaBTYCUJ9Q901cQ7SPI=; b=pFEHH1GYlAy8IuQvQyacz0eUxVlXxfTuVLnGSKEvno/6+Hz7tacEmqzkpiWlP7cPVk KE7Q6AqxLgi3eTFrOdOhYc83Nc78dg886XTeMbsG1O13OyBHIATtxuY7jEs4fOxH7xvQ mv6qKQ2N3F+7pAmAYO8udCezh5s537qqulKgusJvhznzes/XJ2gGKryNpS04BWLkcMjU rpulZ8oT6ZgJ1ieLLBmDYk61H+Foh6/UyBYwgIpi7JsY/ma63t2qPiNO+H54Vifajk4X S0OfV++8+w41XwhS3D4WYbqiH4NXXXYSKdJmgANhIlNUubIGklRy5LB5ghD5WVAZErqR KwdA== X-Gm-Message-State: APjAAAVVcDiDlpuAwjddU2LFXqeKrEf2jlnPHag6BxWjV81pHPOC13Gh jfbghRwB6Rk5TzvuKvLiDXxIv+JIZRGnJc7fuHJzNBSDlrX3nSq/PCmSIpUNea9LLY+gsSZumn1 2eBWdUKKj6wzBPbYrUxQxVzLw6Fm8NWd4haE/kXbxdAOY9r3XNQ== X-Received: by 2002:a65:4002:: with SMTP id f2mr31367074pgp.130.1582171481998; Wed, 19 Feb 2020 20:04:41 -0800 (PST) X-Google-Smtp-Source: APXvYqxvtJqRLRGnJswCwASBerRFf0Vyf9WeErzKZJDMk+C/YPdgpUC3dqw8rZJ8gOr+zPmmdTahEg== X-Received: by 2002:a65:4002:: with SMTP id f2mr31367056pgp.130.1582171481700; Wed, 19 Feb 2020 20:04:41 -0800 (PST) Received: from localhost (li1619-9.members.linode.com. [172.104.39.9]) by smtp.gmail.com with ESMTPSA id a36sm1227778pga.32.2020.02.19.20.04.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2020 20:04:40 -0800 (PST) Date: Thu, 20 Feb 2020 12:04:37 +0800 From: Adam Lee To: Tomas Vondra Cc: Jeff Davis , Melanie Plageman , Heikki Linnakangas , Taylor Vesely , Melanie Plageman , Pg Hackers Subject: Re: Memory-Bounded Hash Aggregation Message-ID: <20200220040437.GA4389@earth.local> References: <20190802152123.ichmacgx3y3x7dc3@development> <20191214173225.3kzsbncr6brpxdll@development> <775d754c-9a61-5363-6998-f87d15f1b592@iki.fi> <20200218185749.srk733n4z57lzxf2@development> <7612ea4d636b6341d0606f4e852d584798e04901.camel@j-davis.com> <20200219191636.gvdywx32kwbix6kd@development> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200219191636.gvdywx32kwbix6kd@development> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.572 definitions=2020-02-19_07:2020-02-19,2020-02-19 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1015 priorityscore=1501 mlxscore=0 malwarescore=0 impostorscore=0 mlxlogscore=382 suspectscore=1 phishscore=0 adultscore=0 bulkscore=0 spamscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2001150001 definitions=main-2002200026 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, Feb 19, 2020 at 08:16:36PM +0100, Tomas Vondra wrote: > 4) lookup_hash_entries says > > /* check to see if we need to spill the tuple for this grouping set */ > > But that seems bogus, because AFAIK we can't spill tuples for grouping > sets. So maybe this should say just "grouping"? As I see it, it does traverse all hash sets, fill the hash table and spill if needed, for each tuple. The segfault is probably related to this and MixedAggregate, I'm looking into it. -- Adam Lee