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 1w5OoI-003D8R-1J for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2026 14:02:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5OoG-00EEdo-2V for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Mar 2026 14:02:13 +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 1w5OoG-00EEdg-1c for pgsql-hackers@lists.postgresql.org; Wed, 25 Mar 2026 14:02:12 +0000 Received: from fout-a4-smtp.messagingengine.com ([103.168.172.147]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w5OoE-00000000yaB-3b1k for pgsql-hackers@postgresql.org; Wed, 25 Mar 2026 14:02:12 +0000 Received: from phl-compute-12.internal (phl-compute-12.internal [10.202.2.52]) by mailfout.phl.internal (Postfix) with ESMTP id CC6DEEC0228; Wed, 25 Mar 2026 10:02:09 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-12.internal (MEProxy); Wed, 25 Mar 2026 10:02:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1774447329; x=1774533729; bh=FxpiveaCz2 18wtbLJPoM1syNkrcXokQffSYQEjRt750=; b=szGTUe/Sr32rogw978+jb/gmCp 9j8qxslMgoHyTJrmJgpYM1W0wo/hpaoaA62bS2kBK5ARTJcQJ1EbNz8/R8HLTo5j NLM666ylOoN/oN05dD5gwkXc5+RM3Ja+5dv//WUgTJM7EngW5XjXQv/5O87GNYVM QiKGnxxFpgVdZeG6GQsMt6XEARhd69Q6KSUtYdoTyeEX2xl6UrD8Yo6k4ZsD4S3D O4OAFXRA5HWRNEmUYUQZPezfv0SHNDQi2T+ay09Hc/3CQSb1pL3PaDxM6mEtmSPn pj8S7Lbc6R8AfJlUtrljnxRHS5FPyBUa+I0t8UFppYXGDoQQSldVsKQ+GYRw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1774447329; x=1774533729; bh=FxpiveaCz218wtbLJPoM1syNkrcXokQffSY QEjRt750=; b=EUNXG1QuaaAc5fRcCKaY9sHZxibh1MBFowy7YNSOVn7bbOeIB+b PkubDijTmnxojFHKq7F/AVADjtdByh7LEuhxsph8OK/PDugcvEdwjlNoAOTD3HVX R2PkahpntZXlyUbLuUUY6CxP+moN7LBKA5ir5h+IWQ+CD4+3Nn2D4Iu+R+qBL9RY h7gTLT6NwHujRA69L7iPjflwEodNIMKq8coTm4+hpJvpyziTGyF0uEtITJyLN7jv TiUwHw+GP3W8g2MIhO8hhFDqbw/yM1JwBBFv8FH7ey7FiA0OTrupWbae6392snTL lPQwt4txXeMgvotqVnXz6DRXIdpeGm8x7Nw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdefvdegieehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesthdtsfdttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnheptedtkeefffeuudeufeeiffekgeeujefgteefvefhudegleehieeufeffhfeh gffhnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvshesrghnrghrrgiivghlrdgu vgdpnhgspghrtghpthhtohepiedpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepsg hovghkvgifuhhrmhdophhoshhtghhrvghssehgmhgrihhlrdgtohhmpdhrtghpthhtohep rhhosggvrhhtmhhhrggrshesghhmrghilhdrtghomhdprhgtphhtthhopehthhhomhgrsh drmhhunhhrohesghhmrghilhdrtghomhdprhgtphhtthhopehhlhhinhhnrghkrgesihhk ihdrfhhipdhrtghpthhtoheprghnughrvgifrdhpohhgrhgvsghnohhisehpvghrtghonh grrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvghrshesphhoshhtghhrvghs qhhlrdhorhhg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 25 Mar 2026 10:02:09 -0400 (EDT) Date: Wed, 25 Mar 2026 10:02:08 -0400 From: Andres Freund To: Andy Pogrebnoi Cc: pgsql-hackers@postgresql.org, Heikki Linnakangas , Robert Haas , Thomas Munro , Matthias van de Meent Subject: Re: Lowering the default wal_blocksize to 4K Message-ID: References: <20231009230805.funj5ipoggjyzjz6@awork3.anarazel.de> <3r2far37ustqtoy62i4l2et5y46thkztzeyrwharxk2fzllndw@kvztwwijbcez> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3r2far37ustqtoy62i4l2et5y46thkztzeyrwharxk2fzllndw@kvztwwijbcez> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2026-02-18 11:32:28 -0500, Andres Freund wrote: > On 2026-02-18 15:26:24 +0200, Andy Pogrebnoi wrote: > > The Windows tests are failing on `Assert("check_GUC_init(hentry->gucvar)")` > > for wal_writer_flush_after [1]. It doesn't make much sense to me as both > > load- and C-value for the wal_writer_flush_after GUC are the same constant: > > > > src/backend/utils/misc/guc_parameters.dat: > > { name => 'wal_writer_flush_after', type => 'int', context => 'PGC_SIGHUP', > > group => 'WAL_SETTINGS', > > short_desc => 'Amount of WAL written out by WAL writer that triggers a > > flush.', > > flags => 'GUC_UNIT_XBLOCKS', > > variable => 'WalWriterFlushAfter', > > boot_val => 'DEFAULT_WAL_WRITER_FLUSH_AFTER', > > min => '0', > > max => 'INT_MAX', > > }, > > > > src/include/postmaster/walwriter.h: > > int WalWriterFlushAfter = DEFAULT_WAL_WRITER_FLUSH_AFTER; > > > > This constant was introduced to fix the same issue [2], but I suppose no > > one checked Windows builds. Windows clearly has an old 8kB value for > > WalWriterFlushAfter during the check. I suppose it is something with the > > CI/build. But I have zero experience with building anything for Windows, so > > any tips on where to look are welcome. > > The fact that the test do pass for msvc (which does not use ccache), but not > for mingw (which uses ccache), does point towards some caching issue. > > We've had some caching problems on mingw before. > > I don't fully know what's going on, but there clearly is something wrong with > ccache here when using precompiled headers, I can reproduce incomplete > rebuilds with ccache's direct mode on linux, cross building for windows (first > thing I tried). If I rebuild with a changed xlog blocksize, I get *some* cache > hits building the backend, despite pg_config.h having changed. > > > I think the problem is that ccache seems to not record a dependency to the pch > file in its dependencies if the pch file is included via -include, if the > included header and the header.h.gch file aren't in the same directory . That > leads to the pch file getting rebuilt, but then ccache just uses the older > cached result for the .c file getting built, because it does not recognize it > would need to be rebuilt. > > I'll go and report that to the ccache folks. I did that and forgot to update this thread: https://github.com/ccache/ccache/issues/1686 Unfortunately not much has happened on that front. But in the course of the investigation I discovered the gcc flag "fpch-deps". I think we should inject that in our build, if supported by the compiler. I don't really see a downside and it does avoid the issue at hand, based on my experiments. Greetings, Andres Freund