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.94.2) (envelope-from ) id 1vAA44-00Eqms-AW for pgsql-bugs@arkaria.postgresql.org; Sat, 18 Oct 2025 16:45:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1vAA43-008R7s-6h for pgsql-bugs@arkaria.postgresql.org; Sat, 18 Oct 2025 16:45:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vAA42-008R7k-Ur for pgsql-bugs@lists.postgresql.org; Sat, 18 Oct 2025 16:45:53 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vAA3z-002vE4-1a for pgsql-bugs@lists.postgresql.org; Sat, 18 Oct 2025 16:45:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 59IGjjdx2038569; Sat, 18 Oct 2025 12:45:46 -0400 From: Tom Lane To: Casey Shobe cc: pgsql-bugs@lists.postgresql.org Subject: Re: Issues with blocksize smaller than 8KB In-reply-to: References: Comments: In-reply-to Casey Shobe message dated "Fri, 17 Oct 2025 11:42:12 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2038567.1760805945.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Sat, 18 Oct 2025 12:45:45 -0400 Message-ID: <2038568.1760805945@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Casey Shobe writes: > I have been comparing performance of postgresql (18.0) compiled for vari= ous block sizes etc., and found that while 8kb and 16kb builds work fine, = a 4kb build does not, with identical configuration. When I try to initial= ize pgbench, --scale=3D10 works fine, but the --scale=3D100 I was trying a= nd even just --scale=3D20 result in a long delay on the vacuum analyze ste= p followed by Postgres crashing due to a segmentation fault. > I also found that initdb fails when I compile for a blocksize of either = 1KB or 2KB build: > 2025-10-17 15:39:13.182 UTC [97433] DETAIL: The database cluster was in= itialized with RELSEG_SIZE 1895825408, but the server was compiled with RE= LSEG_SIZE 1895825408. > 2025-10-17 15:39:13.182 UTC [97433] HINT: It looks like you need to rec= ompile or initdb. I could not reproduce any of these misbehaviors here. I suspect you have a build process problem, ie failure to clean out all compilation products when reconfiguring. You need at least "make clean", and personally I usually use "make distclean" or "git clean -dfxq". (In theory, using --enable-depend would let you be sloppy about this, but I've never particularly trusted that option. It definitely will not work to change configure settings without that.) regards, tom lane