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 1neEB0-0006Vz-GR for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Apr 2022 10:55:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1neEAz-0004nZ-8f for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Apr 2022 10:55:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1neEAy-0004nD-Ae for pgsql-hackers@lists.postgresql.org; Tue, 12 Apr 2022 10:55:12 +0000 Received: from mail-pj1-x1036.google.com ([2607:f8b0:4864:20::1036]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1neEAs-0003t3-8M for pgsql-hackers@postgresql.org; Tue, 12 Apr 2022 10:55:11 +0000 Received: by mail-pj1-x1036.google.com with SMTP id mm4-20020a17090b358400b001cb93d8b137so2463436pjb.2 for ; Tue, 12 Apr 2022 03:55:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:message-id:to:cc:subject:from:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=7nXgKVP615F3Qf2lUdrSX+uk823QflQQ4CvGF8DJAPg=; b=YpnHy9Guz9HYYjPzXCOzbOl5lB7RNILUE8m7f4GICzGN58VPeVl18YkE2POs3iySMM ti7uNWxsRzhbbmL4uC32ZyEwLmkQKBTUpXkpsM3ilvLMUzKOK03p1WNstTa3S/lnj4Xf ZedvYsfLlV7dVQ0z7uRA1pGnXlZeYcp9PaNSYU4PQajxKFcFVPpmcwH5e7fmW9nGK5IN zL1WhL21p8R56Vl7o/MxANefy7+gytY9HxC6iGVFnRbKIWJG1QC3aa6vFxKL55tHQ4MB 0OQsExMdHkhH2+6pFR25mCeGCmMIQcZ7hTZ50hJhx9ol+51sq4dvt9bd/KvPg8LXfV+/ 9oxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:message-id:to:cc:subject:from:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=7nXgKVP615F3Qf2lUdrSX+uk823QflQQ4CvGF8DJAPg=; b=bn4saglstJ0GBJrFeod5jKyLEeeWX94hw8sa0+TCZGOQGD/grm+JXGJAGekuCvxf10 0ajottE+6C1gHMVuBoHb8jyvA+CQMCxfEvnYjbGccibY007shwfzFGFke5AG8Cmxui5x fD1AUkZG5684K/hGKehbhesuFFBaHOeEU9WGJvl0LVcbtvUV/C5pnimPfe8ZFp6Za5bT gs2uh5q7W7BauT+jOG6vUEONDTpsTScfBiLl0r/iRFSogJNIZu9SppmTqEsu9jmnSR+c MaH6IMS/g1AWUZnVvcLXHb7i+IAmTOpXYACbvIRlZ8BvjEgvj+k3s608+KvKgWOxIwl8 Gefg== X-Gm-Message-State: AOAM532MIalwZ4GIChWpaAO3h/LUu/B5+dqwJ4l5aevChY7oJSLDY8Cv YyhkPKRnUVz5LaF4AUQzG7w= X-Google-Smtp-Source: ABdhPJymahGtdxTFZP4jenoJAjNHo6QvBlWPAMbaV5HLDZQw11/YkurOx+nlrd20ktXtNYRZ7hFw6w== X-Received: by 2002:a17:90a:138e:b0:1cb:b5f8:f12d with SMTP id i14-20020a17090a138e00b001cbb5f8f12dmr4348841pja.84.1649760904904; Tue, 12 Apr 2022 03:55:04 -0700 (PDT) Received: from localhost (KD036014041111.ppp-bb.dion.ne.jp. [36.14.41.111]) by smtp.gmail.com with ESMTPSA id l18-20020a056a00141200b004f75395b2cesm38026097pfu.150.2022.04.12.03.55.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Apr 2022 03:55:02 -0700 (PDT) Date: Tue, 12 Apr 2022 19:54:58 +0900 (JST) Message-Id: <20220412.195458.2066037926728685947.horikyota.ntt@gmail.com> To: markus.wanner@enterprisedb.com Cc: robertmhaas@gmail.com, michael@paquier.xyz, tgl@sss.pgh.pa.us, pgsql-hackers@postgresql.org Subject: Re: API stability [was: pgsql: Fix possible recovery trouble if TRUNCATE overlaps a checkpoint.] From: Kyotaro Horiguchi In-Reply-To: References: User-Agent: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Tue_Apr_12_19_54_58_2022_784)--" Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk ----Next_Part(Tue_Apr_12_19_54_58_2022_784)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit (My mailer has been fixed.) At Mon, 11 Apr 2022 21:45:59 +0200, Markus Wanner wrote in > On Mon, 2022-04-11 at 15:21 -0400, Robert Haas wrote: > > ... before v13, the commit in question actually > > changed the size of PGXACT, which is really quite bad -- it needs to > > be 12 bytes for performance reasons. And there's no spare bytes > > available, so I think we should follow one of the suggestions that he > > had over in that email thread, and put delayChkptEnd in PGPROC even > > though delayChkpt is in PGXACT. > > This makes sense to me. Kudos to Kyotaro for considering this. > > At first read, this sounded like a trade-off between compatibility and > performance for PG 12 and older. But I realize leaving delayChkpt in > PGXACT and adding just delayChkptEnd to PGPROC is compatible and leaves > PGXACT at a size of 12 bytes. So this sounds like a good approach to > me. Thanks! So, I created the patches for back-patching from 10 to 14. (With fixed a silly bug of the v1-pg14 that HaveVirtualXIDsDelayingChkpt and HaveVirtualXIDsDelayingChkptEnd are inverted..) They revert delayChkpt-related changes made by the patch and add delayChkptEnd stuff. I compared among every pair of the patches for neighbouring versions, to make sure not making the same change in different way and they have the same set of hunks. This version takes the way sharing the common static function (*ChkptGuts) between the functions *Chkpt() and *ChkptEnd(). regards. -- Kyotaro Horiguchi NTT Open Source Software Center ----Next_Part(Tue_Apr_12_19_54_58_2022_784)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="v2-0001-Fix-ABI-API-break_14.patch"