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 1niQbO-0005jT-9C for pgsql-hackers@arkaria.postgresql.org; Sun, 24 Apr 2022 00:59:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1niQbL-0005RT-GE for pgsql-hackers@arkaria.postgresql.org; Sun, 24 Apr 2022 00:59:47 +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 1niQbK-0005RK-V5 for pgsql-hackers@lists.postgresql.org; Sun, 24 Apr 2022 00:59:47 +0000 Received: from mail-qk1-x734.google.com ([2607:f8b0:4864:20::734]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1niQbI-0007oB-GP for pgsql-hackers@lists.postgresql.org; Sun, 24 Apr 2022 00:59:46 +0000 Received: by mail-qk1-x734.google.com with SMTP id d19so8516675qko.3 for ; Sat, 23 Apr 2022 17:59:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=d2JLM2MnQFq2XwU9HhlkcgziAeKIk/cUl2cLeeCUbQU=; b=CaXurxOrN/G1g7aptLbeSB+osqcugq++JTfDtuWaoAAHzaNPqX5urTetnuoEsoTo0j aVEtxQUUDfxXkp1yxZGUBlLbNFJ6vAIuuIeC0a4jaDc0PnWXbUOXkG8qQfjxUzppJYlx 1MvEKJF8dUjQWSSp2BO+s7islsnuOSbJPXtMg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=d2JLM2MnQFq2XwU9HhlkcgziAeKIk/cUl2cLeeCUbQU=; b=0jk9DilRvfUGYXkuT+NoijGu1Ww5ijBkRuhNvqWmakd2/dvj5FCAGTnsskyi3m/XAq UYoYOTy1b42vp+QyZK29hHZKJE6C20uSZzE1+FTDUMFan/Pzy7uZrZm5pPQCbTwl6eVC J8aO+OlqqP0pIjBiaxzRafBcblt3aE2lQ5j5JceicGE3tjaDTKHrIcifxrBPfTiCGF5c Aqu/nmt/RIXTFHuD0b6mXQuPuy5lBHENw/65vvxC1MwKmu7aAkgaCYnwfMHzS+VktCm6 A6uRPfZllvdLqRKbmGHU+x2Rxb25Klk71yzPu9BhyBsHaA8cdFHpRF3rpFcLKdmK4vkN zCNQ== X-Gm-Message-State: AOAM532plp9D0fQPwF/djL6Jr7TLsMR4bJY/72GHexQAI+X4D9J5eZqY pWy7y62y1kxUMd4j92rcWEzfyw== X-Google-Smtp-Source: ABdhPJzsCn966yGyDaE4bFD7TGPKii4ZJVhmcoi30uKwTZPJxiDyqi7MTwW2sxlfPZ/oDBwS2cIqRw== X-Received: by 2002:a05:620a:2586:b0:680:f846:4708 with SMTP id x6-20020a05620a258600b00680f8464708mr6707483qko.654.1650761981925; Sat, 23 Apr 2022 17:59:41 -0700 (PDT) Received: from rfd.leadboat.com ([2600:1702:a20:5750::2e]) by smtp.gmail.com with ESMTPSA id bm1-20020a05620a198100b0047bf910892bsm3118847qkb.65.2022.04.23.17.59.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 23 Apr 2022 17:59:41 -0700 (PDT) Date: Sat, 23 Apr 2022 17:59:38 -0700 From: Noah Misch To: David Rowley Cc: Andres Freund , Tomas Vondra , Ronan Dunklau , Julien Rouhaud , PostgreSQL Developers , Tomas Vondra Subject: Re: Use generation context to speed up tuplesorts Message-ID: <20220424005938.GA1319606@rfd.leadboat.com> References: <20220118064539.o3gc257z2vavb66e@jrouhaud> <4377612.LvFx2qVVIh@aivenronan> <20220223022504.3ghth7eckjnnubxa@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Fri, Apr 01, 2022 at 10:00:08PM +1300, David Rowley wrote: > 0002: > This modifies the tuplesort API so that instead of having a > randomAccess bool flag, this is changed to a bitwise flag that we can > add further options in the future. It's slightly annoying to break > the API, but it's not exactly going to be hard for people to code > around that. For what it's worth, the three PGXN extensions using tuplesort_begin_* are "citus", "pg_bulkload", and "vector". Nothing calls tuplesort_set_bound(). This (commit 77bae39) did not change function parameter counts, and TUPLESORT_RANDOMACCESS generally has same the same numeric value as "true". I get no warning if I pass "true" for the "sortopt" flags parameter. Hence, I suspect this did not break the API. Should we be happy about that? I'm fine with it.