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 1rm9zg-006MaD-Oq for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Mar 2024 10:13:25 +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 1rm9yg-000D29-SO for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Mar 2024 10:12:23 +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 1rm9yg-000D1x-J2 for pgsql-hackers@lists.postgresql.org; Mon, 18 Mar 2024 10:12:23 +0000 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rm9yb-0057lx-SV for pgsql-hackers@lists.postgresql.org; Mon, 18 Mar 2024 10:12:21 +0000 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4140aadfe2eso9421515e9.1 for ; Mon, 18 Mar 2024 03:12:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710756737; x=1711361537; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=+Rg0aksuPrCcBcBTBW+KrHuk+Mb+52ZGLkrvRL8T9JU=; b=l44h2LoXX3tiUFlBuxp74/w7Is8Ehw/QxcXR24QXZVkMFj3+UFNIKOZcXGBerIazoO Ud5kjvpsRCwi1zNB6JxNKR+sk6wsCVymY9RQh1sBOzBotsgzplFzC+hCD/h3hQAUMsi+ kFEZ/+LZ0urs2E9VA1w07Ed/l9uouCoWqNW3jDkhvtLCJfU8y34CYlOGvfOz/HkNi7Ci cRDk2I4vhNvEBc3nkmK7Cb00FWoODqOV5NKrtV8W7etJ0UGefbgfmn/aON2dEgHHkQf/ YIDCfUQImFIO5c46J/w2h9hzM6QydmgmvEltZ4JN5Ng62Zewf3A74EKP5M4q5s5GbOc7 0/8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710756737; x=1711361537; h=in-reply-to: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=+Rg0aksuPrCcBcBTBW+KrHuk+Mb+52ZGLkrvRL8T9JU=; b=wySHvYUTKC8WlLD9J37o0IEVjZHDY71PqkS99HHlnzA5GGFoeJq9edpy7K8tNxVVFf bwUOLLGiQeghA+SNWzHxt1n+Kd8z5DMTq5Lu8XOgn1rRrBWtQHK0urcuqB+q30qouiDm SDek9rz9Xmv3RDSLpuoUbFRcUaVItaywTHW0/Sjww0O4fa+S5bmprZHrNQsklzo5Bpml M0qi+Dg+Wa7a5yBu6ilrmagZQ54GD0qBNr9d+rWk//DtuoDtLwwhdym/57BHUdrU157t GjdJ9mQLSaAOcmFdToMo5gL1NX8vmENCNYB27vDchwrBUEkelBCvVDyI68sVWBhFlGbF dfFw== X-Forwarded-Encrypted: i=1; AJvYcCVtxSYQI9fBbtj2qZYR/8DiZP6TqX3kYXKxRWd881rVMXrzpmpNLAKi2crKVwGB7B8E+RK4bKWuk29R/HdSJ6bnHZY7epSsWpzg0fVQJKfVTMKm X-Gm-Message-State: AOJu0YzziOKEldK+mt4u3cx052zwIDeJe3foV/C0hRsN/5v6+23uV+6P MVurvdCtiamDZ3Zm6Ylf6Oi2p1+gwTJvgAUuC8kAahmk2Wwob+CGEDki99RE X-Google-Smtp-Source: AGHT+IFDfFR6F1ovIzF4VhNwk7JznOJvYNEAUmiT9cTfUPJVBKY7ZBkr3XWavUQvYIgkinGf4n45DA== X-Received: by 2002:a05:600c:468e:b0:413:117e:fd4a with SMTP id p14-20020a05600c468e00b00413117efd4amr8842406wmo.3.1710756737489; Mon, 18 Mar 2024 03:12:17 -0700 (PDT) Received: from ip-10-97-1-34.eu-west-3.compute.internal (ec2-15-236-134-5.eu-west-3.compute.amazonaws.com. [15.236.134.5]) by smtp.gmail.com with ESMTPSA id bi20-20020a05600c3d9400b0041424fbb400sm714166wmb.16.2024.03.18.03.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 03:12:16 -0700 (PDT) Date: Mon, 18 Mar 2024 10:12:15 +0000 From: Bertrand Drouvot To: Bharath Rupireddy Cc: shveta malik , Amit Kapila , Nathan Bossart , PostgreSQL Hackers Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On Sat, Mar 16, 2024 at 09:29:01AM +0530, Bharath Rupireddy wrote: > Please see the attached v11 patch set with all the above review > comments addressed. Thanks! Looking at 0001: 1 === + True if this logical slot conflicted with recovery (and so is now + invalidated). When this column is true, check Worth to add back the physical slot mention "Always NULL for physical slots."? 2 === @@ -1023,9 +1023,10 @@ CREATE VIEW pg_replication_slots AS L.wal_status, L.safe_wal_size, L.two_phase, - L.conflict_reason, + L.conflicting, L.failover, - L.synced + L.synced, + L.invalidation_reason What about making invalidation_reason close to conflict_reason? 3 === - * Maps a conflict reason for a replication slot to + * Maps a invalidation reason for a replication slot to s/a invalidation/an invalidation/? 4 === While at it, shouldn't we also rename "conflict" to say "invalidation_cause" in InvalidatePossiblyObsoleteSlot()? 5 === + * rows_removed and wal_level_insufficient are only two reasons s/are only two/are the only two/? Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com