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 1rl8Y2-000Iyg-DA for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Mar 2024 14:28:38 +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 1rl8Y0-009cop-WB for pgsql-hackers@arkaria.postgresql.org; Fri, 15 Mar 2024 14:28:37 +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.94.2) (envelope-from ) id 1rl8Y0-009cof-Mm for pgsql-hackers@lists.postgresql.org; Fri, 15 Mar 2024 14:28:37 +0000 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rl8Xx-004equ-Gl for pgsql-hackers@lists.postgresql.org; Fri, 15 Mar 2024 14:28:35 +0000 Received: by mail-io1-xd35.google.com with SMTP id ca18e2360f4ac-7c88c7a9262so33467439f.3 for ; Fri, 15 Mar 2024 07:28:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710512913; x=1711117713; darn=lists.postgresql.org; h=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=xQ/v55BHn9+voYo+H7w1HsMrSELyiJaUcl6zp5IFy5E=; b=CvqHBuij83RsPNCmUV+6koxsJ82otucJdG99PTT3xg3ZINgFQqAJ+pk6qfas8kgZrG 6EcxS7tttBaUxU8QhLNF3xWnYffxMgaPCSL5dCQixu6wkBjHbjCywZV6tjfMakEQphLj muTOHUCUH4M67uh+S0dB/XzVy1PLKTzWL9wDCUWMXZO5wuPMSzW2csrRA0tfTusOAnj3 hc17H86gpL5GiqM+Ax5w4OEhVS+6IiVFhkPGt9wxW1Jym5W8Em3mjy/SMXTlGolIEEGB ZpitNgllkiQnyGTSFGIsu0vbq2hRU/2/iK78yxphBBaUZg+xNOlfU491MNvz7S/r/6o6 YtUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710512913; x=1711117713; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xQ/v55BHn9+voYo+H7w1HsMrSELyiJaUcl6zp5IFy5E=; b=O4EFIqPOzFV3MuCwRa8aygIAwIKAnAYDldA+BfqJK1iBzsNBU/MXMKEVUZ8ucI3fJg WaO9QYEMVvVtxQpk5ZOXm4ntpKrRjAPfMzNFznNMU7FhoaurZc9zJ5H66L6P7h1jvicI s9TkwJkqnaq+rsNcx5EBLu5Ou2ZdQ5MisrYtNpMyTMiQiWH+BKDKl8VYHCrqrVJ7ZJGI Qtn6CCZWH/lzU3iZak8SzkDtrKZx8F3E6mCnYdKfPlqQ8yVjt3rGJVlqBNlHulzzHOYN I0zWI7BjRQ6B/Yy6faeqvdYxRCxOObXTxqnoKRKGPAtSDgU2CKAYqGGOFZezo1idbB1N qlPg== X-Forwarded-Encrypted: i=1; AJvYcCU1QrZtOkV4IrWWaxQ6rIPuPFnwK00jjIbl/o4dcSjLF9ifFmZZe7lESUbSFnt4ZOQuxns1yyBM1/wLxQpwdo8iFPjtK6vS4JSk9C8wkL2yqc8o X-Gm-Message-State: AOJu0YxqsiPxB/GAaYa5ynAuDDD61LnkN1G835rClLTSc/ONoyaD+FjH YMJEyEVtXiDwU8exPblgRV+WQ5hhxgHIXR3YMQgllcgmHEB7zXhw X-Google-Smtp-Source: AGHT+IFN0eUOVBN6SKeRAHtvRGxi0LMFXWRGNbx6iZ/uVMPEu+izkefZMKj4Dt8fg1DvcLVEfTIMIA== X-Received: by 2002:a05:6602:2bf2:b0:7c8:bc3a:40e0 with SMTP id d18-20020a0566022bf200b007c8bc3a40e0mr5599116ioy.8.1710512913512; Fri, 15 Mar 2024 07:28:33 -0700 (PDT) Received: from nathanxps13 (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id s19-20020a056638259300b004771f23d98asm775684jat.165.2024.03.15.07.28.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 07:28:33 -0700 (PDT) Date: Fri, 15 Mar 2024 09:28:31 -0500 From: Nathan Bossart To: Amit Kapila Cc: Bharath Rupireddy , Bertrand Drouvot , PostgreSQL Hackers Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation Message-ID: <20240315142831.GB3391357@nathanxps13> References: <20240301221108.GB3024365@nathanxps13> <20240303214434.GA3036597@nathanxps13> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, Mar 14, 2024 at 12:24:00PM +0530, Amit Kapila wrote: > On Wed, Mar 13, 2024 at 9:24 PM Bharath Rupireddy > wrote: >> On Wed, Mar 13, 2024 at 9:21 AM Amit Kapila wrote: >> > > So, how about we turn conflict_reason to only report the reasons that >> > > actually cause conflict with recovery for logical slots, something >> > > like below, and then have invalidation_cause as a generic column for >> > > all sorts of invalidation reasons for both logical and physical slots? >> > >> > If our above understanding is correct then coflict_reason will be a >> > subset of invalidation_reason. If so, whatever way we arrange this >> > information, there will be some sort of duplicity unless we just have >> > one column 'invalidation_reason' and update the docs to interpret it >> > correctly for conflicts. >> >> Yes, there will be some sort of duplicity if we emit conflict_reason >> as a text field. However, I still think the better way is to turn >> conflict_reason text to conflict boolean and set it to true only on >> rows_removed and wal_level_insufficient invalidations. When conflict >> boolean is true, one (including all the tests that we've added >> recently) can look for invalidation_reason text field for the reason. >> This sounds reasonable to me as opposed to we just mentioning in the >> docs that "if invalidation_reason is rows_removed or >> wal_level_insufficient it's the reason for conflict with recovery". > > Fair point. I think we can go either way. Bertrand, Nathan, and > others, do you have an opinion on this matter? WFM -- Nathan Bossart Amazon Web Services: https://aws.amazon.com