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 1pGBd0-0006iW-Cx for pgsql-admin@arkaria.postgresql.org; Fri, 13 Jan 2023 04:25:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pGBcy-0003Yf-DX for pgsql-admin@arkaria.postgresql.org; Fri, 13 Jan 2023 04:25:16 +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 1pGBcx-0003YV-Nq for pgsql-admin@lists.postgresql.org; Fri, 13 Jan 2023 04:25:16 +0000 Received: from cyan.elm.relay.mailchannels.net ([23.83.212.47]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pGBcu-0003yr-I1 for pgsql-admin@lists.postgresql.org; Fri, 13 Jan 2023 04:25:15 +0000 X-Sender-Id: hostpapa|x-authuser|list.pg.gavan@pendari.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 10DB35C12AC; Fri, 13 Jan 2023 04:25:09 +0000 (UTC) Received: from hp309.hostpapa.com (unknown [127.0.0.6]) (Authenticated sender: hostpapa) by relay.mailchannels.net (Postfix) with ESMTPA id 45BD75C1110; Fri, 13 Jan 2023 04:25:08 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1673583908; a=rsa-sha256; cv=none; b=sx1YAUf/2sIPTgTxfkdp1fXWkg8Vf4gsNFnvC2030HPXCjsKNeJbWemShlbUKuxoN202j/ tP0VKj6rbIwZqUQardW+nSMOEkM0FhXfFbkBY0cCmYOMvGBCKXSK9bhV9aodLDLU1BCz/7 eKueP9LlxPqe4eouCEUf9nUTpLGh5hB7O6B8xag0nFJoDm6Gv1+wRwYcO3WaqGgBQj6mcC zrZHo0izK/tVzjUCKATKxv363adm4OQKui9/IWN7d8chT/DFUatYHyZGSwrP/hZxmytwCY jZxdKKyTsY/uGkvO3Jk8Jhos2R5g0j8lb/MZnY+6HT6GkzVjDkWeCj9jmb3FdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1673583908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=FOLec4i5LuRnOeI3Sc1Uj5csf6mWtLDcY2qKmLd7+iE=; b=PBXb10auF5ZmvkJro9zdOcFGiIx4VZhmrCI00Z9Q0v2AgoMZrXln4F5tEOPz3hm8Q6KWHY xpbYIywHGNzCcR26or0HSEl4MWUgdPgoLjQn88FLc9uoONAOz6Ysyx5wLm9ypACz3Xz6+Z RpvT34I+sX4etdFNA4iI/2PQm9UlmaC4Rv/s1H8l9xYqYVVYpQc4N7H7IynRxm2Rs1kke9 Enzz5g23240PLtkIbtNKKc3LC0T38zrdT1OsJG96zIHdOdd9ukgEld7B9Ylledq2DS0AAb 2QB1/eUOl8c8HA6PXJTvLsP2WUQpc9AwH741LWfXc9ba5aeExhsFx+THPPUjNA== ARC-Authentication-Results: i=1; rspamd-6f569fcb69-hblvr; auth=pass smtp.auth=hostpapa smtp.mailfrom=list.pg.gavan@pendari.org X-Sender-Id: hostpapa|x-authuser|list.pg.gavan@pendari.org X-MC-Relay: Neutral X-MailChannels-SenderId: hostpapa|x-authuser|list.pg.gavan@pendari.org X-MailChannels-Auth-Id: hostpapa X-Towering-Relation: 75bca8e3245e8183_1673583908757_3786253804 X-MC-Loop-Signature: 1673583908757:2821953021 X-MC-Ingress-Time: 1673583908757 Received: from hp309.hostpapa.com (hp309.hostpapa.com [69.90.160.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.116.179.96 (trex/6.7.1); Fri, 13 Jan 2023 04:25:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pendari.org ; s=default; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References :In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=FOLec4i5LuRnOeI3Sc1Uj5csf6mWtLDcY2qKmLd7+iE=; b=ltZav5j+CjDF9QYsshbxrRNYNz P3zz/yKc/814I6cSFsrLGN4Rte7dTxcULrbY6oNQDiJwyh+lkS0BKnpnMjfIhoVm6Hsp8biSVWveu PfeySx4zmT5j1+q57qf/quNXcDSFps/8ZV3cRnzCxNNmf+B+W+sWlZzqaLnQ8FpvAMAskxHLjbTon mLbUV/N7FdbtX438QnpKDM97C5+Fmfkk6fTGkR1W4A8iTwAUMDp3XjLj3+YCxo+i9bsBMuI1rDQNT bWaVtYxdeNZNgz9aylIZbWnMIDJc/AE4Zd1Z7nRckZ0fNVfWqRku6+lenfuPULCdspoccXqN1LUIo 09tBzFOA==; Received: from [206.83.114.236] (port=2075 helo=[192.168.20.23]) by hp309.hostpapa.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pGBco-005QK0-5v; Fri, 13 Jan 2023 15:25:07 +1100 From: Gavan Schneider To: "David G. Johnston" Cc: pgsql-admin@lists.postgresql.org, Ron Subject: Re: Synthetic keys and index fillfactor Date: Fri, 13 Jan 2023 15:25:01 +1100 X-Mailer: MailMate (1.14r5933) Message-ID: In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AuthUser: list.pg.gavan@pendari.org List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk With respect to =E2=80=9Cnot 100%=E2=80=9D for index packing=E2=80=A6 On 13 Jan 2023, at 11:17, David G. Johnston wrote: > I'll admit it seems a bit counter-intuitive, and there really isn't a "= why" > offered in the user-facing documentation, but for 10% I'm not too worri= ed > about it. > I have had the same =E2=80=9Cwhy=E2=80=9D and this conversation got me th= inking=E2=80=A6 The resulting =E2=80=9Cwhy=E2=80=9D is based on what would be needed to m= aintain the ACID requirement while the index is both in use and being reo= rganised. Specifically, when one worker is using the index it has its =E2= =80=9Chorizon=E2=80=9D (ie., version) of the index fixed, another worker = might add to the data forcing an index rebalance, this means two, and ma= ybe more, workers are in the same index each has their view/version of th= at one index. This =E2=80=9Cmultiverse=E2=80=9D is supported by multiple = versions of any given node. This can be accommodated in the spare part of= the index packing. The spare space allows the index rebalancing to be wr= itten into blocks that may already be buffered. Once the index rework is = complete, WAL has been written, ACID compliance assured then the revised = index (with all its freshly written nodes) is declared open for business = and new workers will get this version for their horizon. Older workers wi= ll complete on their version, and the nodes supporting their view will th= en out of date, and the space can return to the block=E2=80=99s free are= a . The cycle repeats=E2=80=A6 Likely I have many of the details wrong but it=E2=80=99s an explanation t= hat=E2=80=99s good enough for my purposes. :) Gavan Schneider =E2=80=94=E2=80=94 Gavan Schneider, Sodwalls, NSW, Australia Explanations exist; they have existed for all time; there is always a wel= l-known solution to every human problem =E2=80=94 neat, plausible, and wr= ong. =E2=80=94 H. L. Mencken, 1920