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 1vw8SI-004qnO-16 for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Feb 2026 00:45: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 1vw8SH-008MHn-0m for pgsql-hackers@arkaria.postgresql.org; Sat, 28 Feb 2026 00:45: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 1vw8SF-008MHF-0I for pgsql-hackers@lists.postgresql.org; Sat, 28 Feb 2026 00:45:12 +0000 Received: from [182.140.209.19] (helo=xmail.ww-it.cn) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vw8S8-00000001alC-0wBl for pgsql-hackers@postgresql.org; Sat, 28 Feb 2026 00:45:10 +0000 Received: from xmail.ww-it.cn (localhost [127.0.0.1]) by xmail.ww-it.cn (OpenSMTPD) with ESMTP id 185a00ef; Sat, 28 Feb 2026 08:44:57 +0800 (HKT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=ww-it.cn; h=message-id :date:mime-version:subject:to:cc:references:from:in-reply-to :content-type:content-transfer-encoding; s=default; bh=8+ef6e5xY k1b5HYv7ezWY06GsOYo1ZOjy0VLQvx70Wc=; b=pAGFuTgZOnpiwroXxcPTFEXrL PPglacpjpLi6CbTmUKRyCRrI2sRCy9e6780nIrhmd04ZfWp+jgVxOoDUIMkCw06i 0C4SQjFFOQEngOoE7jpnaAdJlgHrYnKFvUQ3n+bXC/b+x3cf4MBZTJjzVDG81EA0 oGHmivtmmSM6aUN0nA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=ww-it.cn; h=message-id:date :mime-version:subject:to:cc:references:from:in-reply-to :content-type:content-transfer-encoding; q=dns; s=default; b=uXX DO8CSF1g7n4OTQD/bvHMCDX4RtZM70L2pN3EV2QpHq45kHdOfyGciQN3wR0L5u9R DSbbhbuMCKDeRdgzM7mQpEBVC771hh/C22dkOVxoIlh5zKFYFINN6WY7Vpxk80sl u/kKakxQIaeBoC+1F4Bfes7tllt64eZTzk80KzNI= Received: by xmail.ww-it.cn (OpenSMTPD) with ESMTPSA id 253396aa (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 28 Feb 2026 08:44:55 +0800 (HKT) Message-ID: <99e3e7e0-b2b7-4f4e-bb65-94213c2a9826@ww-it.cn> Date: Sat, 28 Feb 2026 08:44:52 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PROPOSAL] Doublewrite Buffer as an alternative torn page protection to Full Page Write To: =?UTF-8?B?6ZmI5a6X5b+X?= Cc: Robert Treat , Jakub Wartak , pgsql-hackers@postgresql.org References: Content-Language: en-US From: Tony ZHU In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 182.140.209.19 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi ZongZhi, Thanks for feedback. I have read prior thread on this email, and know your settings, when did the testing, checkpoint_timeout set to 30s is too small, it's not a reasonable setting , the value of checkpoint_timeout is determined by shared_buffers and the workload, in real product environment, we usually set it to 30min or longer, even 1 hours, when the setting is correct, FPW will not be a problem or issue. other issue is introduced by double write that is the recovery procedure and replications, it is not a small project. if you really focus on the write or read latency, I would like to advice you to take a look for OrioleDB storage engine, I believe that's the correct direction. it is more efficient reads and writes, resolving many known overheads and issues in PostgreSQL Regards Tony On 2026/2/28 03:11, 陈宗志 wrote: > Hi Tony, > >> Personally believe that the Double Write is very smart for MySQL InnoDB, >> but not a good ideal for Postgres, currently, WAL is the best solution >> for Postgres, >> maybe the next generation log system for Postgres could use OrioleDB's >> storage engine. > Just to clarify from a technical perspective, both MySQL and PostgreSQL > use Write-Ahead Logging (WAL) as their fundamental transaction logging > mechanism, so there is no difference in that regard. > > The comparison here is specifically between Full-Page Writes (FPW) and > the Double Write Buffer (DWB). Neither of these concepts conflicts with > or replaces the core WAL design. Instead, both are simply different > techniques implemented to solve the exact same issue: preventing torn > pages during a crash. > > My proposal is aimed at discussing the performance tradeoffs and > implementation details between these two specific torn-page protection > mechanisms, rather than replacing WAL itself. > > Regards, > Baotiao