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 1vicIk-00BJ8N-0s for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jan 2026 17:47:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vicIi-008Tme-0Q for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Jan 2026 17:47:28 +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 1vicIh-008TmV-1o for pgsql-hackers@lists.postgresql.org; Wed, 21 Jan 2026 17:47:28 +0000 Received: from mail-dl1-x1231.google.com ([2607:f8b0:4864:20::1231]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vicIe-001d9m-1h for pgsql-hackers@postgresql.org; Wed, 21 Jan 2026 17:47:26 +0000 Received: by mail-dl1-x1231.google.com with SMTP id a92af1059eb24-124566b6693so333729c88.0 for ; Wed, 21 Jan 2026 09:47:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; t=1769017644; x=1769622444; darn=postgresql.org; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jtdHlBakTX0aBFIZOUGl4I9uQ75LE4fcDj0K1DOiMz8=; b=YVwOieZRgrKzDNEpzMThbiWL2Vl196GgH4NHmK06ojihqcfDB3Na+gUfLc8e8Qj6sM fakl8wupMgXGSUsN6kiozsBCxPjoguRLWdOB5ndFJUFWctCH0Umk0hceGQlXR41KIuZu SKzhIuDjRxCTZkCmHOe159eCa8uHFJC+xIVSU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769017644; x=1769622444; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jtdHlBakTX0aBFIZOUGl4I9uQ75LE4fcDj0K1DOiMz8=; b=cG3eVpc6Wdk745sWPK/iAyIu2TTTyb4D7cq4EIhc6786/5oW2vhcFz9l21lZ8z0uP8 LZK+i0okpRy/6Yd6D+VpJJ6oaEUvqgFMFAjyGLlSnHCa1oFKJ6LS40VF2XB6oXvmuhTB wYNPgsdPPE4VFvBbzHEC1Ekhzmj4YcmxUqRyiwp4gFrcVyEKnruDlt68hJ9MDtYiRGI0 +tj1j0hDuPz9lQkRmVQMS/2KEutFTkLCAVUN5b8IH2Or+9QdiA4tpSEs6ezjEN4jP0Hq k1XOxKsUsqDtWIE3UIcM4NubtBycZKgcYlU29j6GHJXYAF0oAeYMOLEjj5trvw2e/VPB KXYg== X-Forwarded-Encrypted: i=1; AJvYcCWuxVPdcO5ZVH0FCLSh9lUmwDlylCoicEyUUCYU7OX7umiYFnj7eCVrXq/Sh1rloXfFwOXo3vU8EtBrzAGL@postgresql.org X-Gm-Message-State: AOJu0YyxOsIFwFUDhPn5in2IgNO0+h/M5ggbZrAPqqRd+yvvB4vuruST tjCPePulROHYB4X2BgBIyu2T/yUVwiQ7wHpMW0Qz9pxjtfodjyi1n/I+4QBHjSmRig== X-Gm-Gg: AZuq6aJdiLCRZ9/u/4wxCEtjUowsbRUe+gKnHM5jhWkSW4uzr+CncZHEdm2DO6OTIRI kILzeHPzvRU+rewVec99QWG95QQcyEn95D/R/jgEyUq3CWHdoW7l7wGEeAGX+3vC3AD7Nz2LaW6 MbzTn1cBLvm/XPjlynJgrH4rLHqba1nni5oCqHVx25k1QsZthakZlswaiQpYaKm7ccWCCaqhg9j ZOq39OfLc7OOeUWRq1X3DIfIg4sO0XvyuIRO1y93p57J7Mxt82LUcQkQQyIewUReb2uj9KxFa7M GYWe8+sMKfTHKmTGdEHaxqIjhBEhiufZ9jWQOjRjTFWGQnteYs+b7zku/gZhBsM3HrrrZfBpKB8 uy+VgIwZh83a3REG/Qv+CqtTrDDhshrIua9iunVMG0XHnwYGGhzp4lpApYD/t6sD/80x8EOlUnV ylIgBEmxMPt4d8aJDo9aQw3eWoXSSa3PCLLlRDR7MAdV8= X-Received: by 2002:a05:7022:2526:b0:11b:9386:a3c1 with SMTP id a92af1059eb24-1244b395eecmr14076213c88.44.1769017644153; Wed, 21 Jan 2026 09:47:24 -0800 (PST) Received: from microsoft.com (c-73-15-160-255.hsd1.ca.comcast.net. [73.15.160.255]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1244aefa7c5sm27803141c88.10.2026.01.21.09.47.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jan 2026 09:47:22 -0800 (PST) Date: Wed, 21 Jan 2026 09:47:20 -0800 From: Noah Misch To: Mark Dilger Cc: Nitin Motiani , Andres Freund , pgsql-hackers@postgresql.org Subject: Re: Inval reliability, especially for inplace updates Message-ID: <20260121174720.71.noahmisch@microsoft.com> References: <20240618015730.jijhox2a3w3t26en@awork3.anarazel.de> <20240618152349.7f.nmisch@google.com> <20240831010711.67.nmisch@google.com> <20240930193350.04.nmisch@google.com> <20241013004511.9c.nmisch@google.com> <20241024025357.a8.nmisch@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.2.12 (2023-09-09) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Jan 21, 2026 at 08:59:51AM -0800, Mark Dilger wrote: > On Wed, Oct 23, 2024 at 7:54 PM Noah Misch wrote: > > I'm attaching the branch-specific patches for that and for the main fix. > > Other notes from back-patching: > > > > - All branches change the ABI of PrepareToInvalidateCacheTuple(), a > > function > > catcache.c exports for the benefit of inval.c. No PGXN extension calls > > that, and I can't think of a use case in extensions. > > Unfortunately, I can think of four. Those are non-PGXN extensions, right? Based on your experience, I probably should encourage packagers to do an early check of the packages they build, especially if they build tableam modules not found in PGXN. How do you see it? > I have four Table Access Methods that > I now need to fork to be compatible with 18.0 and 18.1 on the one hand, and > 18.2 onward on the other. For what it's worth, the ABI break you quoted is the v14-v17 break, not the v18 break: - v18.2 (06b030e) is changing the CacheInvalidateHeapTupleInplace() ABI - v14-v17 (e.g. 2e58802) is changing the PrepareToInvalidateCacheTuple() ABI > I'm sorry I didn't follow this thread before it got pushed. > > Is there a reason for doing this change in back branches? The thread is > pretty long, and I'm struggling to find a security or stability > justification for the ABI break, but perhaps there is one. Chiefly, the fix prevents data loss that arose via losing a relhasindex, relfrozenxid, or datfrozenxid update. (The log message of 0f69bed says "another backend's DDL could then update the row without incorporating the inplace update".) For an example, see where that commit edits src/test/isolation/expected/inplace-inval.out.