Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wH33Z-006p61-2d for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Apr 2026 17:14:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wH33Y-00Ai61-1o for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Apr 2026 17:14:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wH33Y-00Ai05-0t for pgsql-hackers@lists.postgresql.org; Sun, 26 Apr 2026 17:14:08 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wH31o-00000002tsg-1F03 for pgsql-hackers@postgresql.org; Sun, 26 Apr 2026 17:12:21 +0000 Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-ba67b332bbaso1077579866b.0 for ; Sun, 26 Apr 2026 10:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1777223539; cv=none; d=google.com; s=arc-20240605; b=VSQf7EyPg3TxiZdZR7RriAVq45ED6CBEgs5dJjlcwz1pB4jQnPVF4FIOHHC+bNwDPf CFQG0tlEVBmIdc3+NhJkU7QrN2RN/9D4Q/v2p6E799p9KEbd/8o6iik8yt4mH/azxszW 3bA6a7XSZhklqUQufr9juhfa8qHDz4sYcSp74j3++CnE7u9+3dYLtZcFZczokZZc3pIU maBb1QlVpZSWiHJUMKYVzlpL7H12Ix2YTz9VTM4NEV5vqIei1GveA1QF9lyLydSWYVtF tyKh5lIDakXIhcBcGw1hHSA1g1xJVyOjZPs4jlRdC2M8I7kKIKCGfJ2g6usQ9scqAOnp OKaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=+ViMxUoQV35r+bnAixLuxitk3hHfbPxdzMij+yFkwrU=; fh=5qC0DoxzM746CLar0yONuj8kj7pw2Be8/Wrly/n77z8=; b=jdGFcY0buMT5M0oqHT2iL0XzOZ8mttfP+xlN4YG8yw9p1PIC2JUJ6pLYyLIceA6eb/ 7LIvwGcvnxcqAgOHeO+UdFHqmxOHj3sD3J2eYu5ZVlIXhaYNuIpimufctrPFTwkujpGm /c4zUtgVx+DIIwP3PMBlqer49JnbI6f1i9Y2G8as0thhD7c3nhHxpAEW/vkb/DAtZY++ n9dIdrGuf9qioWqHEt4J3h5Gu/wt94TH+Nak6hKMMTD73BPVKQYrAsYjXKkhWj/uISBf hTothoR1h1YeuzhcDoUPCkAD7mPReXiocKLy4ld6NvLTiqpLDMMYPAbgmCY9r5fxAX0E GFrw==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1777223539; x=1777828339; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+ViMxUoQV35r+bnAixLuxitk3hHfbPxdzMij+yFkwrU=; b=Cvm+6Ft30XRMBDFVLBFxvsmDgDJ0qm3mYFsYfvrWrUXBieXI1lM/6Mon31/lq8Vudt otrM51EoSy2JsextdysV64a4GBJZDW2WU5WI3rBueHv3B25S5liFBZg0EiMjbO+MZc/x X7PhqG2qku/N32Lnag6n39BcveBGJsjNRE/2vYJls2BN054GjyGIDW2TnLvLCz/UnCTh VQXoOdgpHUZdp5ABo40nWYeFE/OD/jBd1D9P6KwrkrwK/nGxyP2EqKIg1IKjuTd6ba4n QM/yH7A0zL3w7TnpbbHIKYJ6nHQUjk5g3RrUfywYJJiSdIZ5uY37wWsy4BG8X6Z1K1Oa wY6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777223539; x=1777828339; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=+ViMxUoQV35r+bnAixLuxitk3hHfbPxdzMij+yFkwrU=; b=FSFWYtybIYQnKk0F4Fov3oJEzvJYTGu6FLzZlWzxpPlBzcoyWFO/2llWkGUBL+R7x7 L4Z8XLFK/rSf5OUAylU/a2EGv+IpUxUrTYLxOeXo44+CwJOPuECREzZKjOnE0XCiWIrA 40M40s/LTYutLa6bumxFn05zM7eu1ilzeZaKqBJ5iKGu6HZ/UG87GKtALN3PMDhBwOqs R0r3xehJokwa3Jz459JKGJyRzcLIGADs4SsdMbLuLbTIinkHH2eJPpyhkWx4PJRSqRSF UtHhdaB523OcKw4XWwUqvILn5wNWjE7GFRxne9zVEpzXcBDmyNzyWOdZe2U4EJWw3X++ PYfw== X-Forwarded-Encrypted: i=1; AFNElJ+oASATyASueUfs++4yIFWaGTbmVodzik0lRI7xEmahC7YCA0y0MURu8Yc+sWeJ8OpGKn/ZOKmpalQzTw+3@postgresql.org X-Gm-Message-State: AOJu0YwyPs19G7B8r6CgRIc/Rh9u2yh0+NaRTB6in+oVcjzF1WM61Wa+ Wdm7T9tf9OYpaDQJfHhU5p7qffxBxftVb+NlLuZETdeMHQ/90B8b/ibUuDlkZo8gOIiJn+8FV2U f2+1z5n7ApnVA4B4nRqOmu/YibvcWpWw= X-Gm-Gg: AeBDiesOgEw5mVknmnzMGU0cEAurQiwhrmVSZ8Rt+010s9dO63tuzA482L+t96xDjuF abpn5QRrQPdPPj2bcRVV6YKgX8yv8kiqmRVjtqr2fi4vd8nBE+4sRnyMcINQIe1F9dnUaXOuKnM +YIPFqLLC/F+xzdzrONfMvD3WAhnHYbGhep81aNBXUKDe8mFwk+Y6pAqCyYOWTNqVpZYNNMGyp+ TRwbr9x9AuNv9OOB04jcv/VaiHYn7udjGZnLgaUzJ+FSADiXTVXl6LbUwtH9jykjEAJ8ztJfcV1 lMyj60OE9CggwUvKsiEhjocZtQB1h9lkg4VzmM7WS6vQPRORrg== X-Received: by 2002:a17:907:97cc:b0:bac:75ae:ef3d with SMTP id a640c23a62f3a-bac75aefeedmr796793066b.0.1777223539108; Sun, 26 Apr 2026 10:12:19 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Robert Haas Date: Sun, 26 Apr 2026 13:12:06 -0400 X-Gm-Features: AQROBzC3EccouieLtUNKLMTWRzxiVfBVaWLvOh8vZFqBuPWqBixu6CLVueXYSQs Message-ID: Subject: Re: Use log_newpage_range in HASH index build To: lakshmi Cc: Kirill Reshke , pgsql-hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jan 5, 2026 at 3:48=E2=80=AFAM lakshmi wro= te: > Following up on my earlier note, I implemented the proposed HASH overflow= page reuse enhancement.Recently freed overflow pages are recorded in > _hash_freeovflpage( ),and _hash_addovflpage( ) now prefers reusing those = pages during allocation before falling back to the bitmap scan. > > The change is backend-local and allocation-only,with no WAL or on-disk fo= rmat changes.I verified correctness using index build/drop and VACUUM cycle= s,and confirmed WAL neutrality by comparing WAL generated during HASH index= builds with and without this change (no observable difference beyond norm= al noise). > > The patch is attached for review.Feedback is welcome. It is probably best to start a separate email thread specifically about this patch, because it's doing something quite different from the original patch. I suggest presenting some specific performance results, as it's not very clear how much benefit this might have. It might be good to test a favorable scenario and also an unfavorable scenario, describing and showing results for each. --=20 Robert Haas EDB: http://www.enterprisedb.com