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 1rmoo4-00A22c-Em for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Mar 2024 05:48:08 +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 1rmoo2-002i3m-MA for pgsql-hackers@arkaria.postgresql.org; Wed, 20 Mar 2024 05:48:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rmoo2-002i3e-Ah for pgsql-hackers@lists.postgresql.org; Wed, 20 Mar 2024 05:48:06 +0000 Received: from mail-lj1-x234.google.com ([2a00:1450:4864:20::234]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rmonz-005Ufn-DE for pgsql-hackers@lists.postgresql.org; Wed, 20 Mar 2024 05:48:05 +0000 Received: by mail-lj1-x234.google.com with SMTP id 38308e7fff4ca-2d4541bf57eso85532161fa.2 for ; Tue, 19 Mar 2024 22:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710913681; x=1711518481; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=5LsCb91Rn14BCoqJ2YOQ72ly86SJFJ5OWLOj96pEbOQ=; b=k407eZ94lA+bTxLJWu63eolWjsS8MtoyuJM3DHXLyAtBPJrRiterp5TnjdK3k9Oe3u 6Bi4JaiMSsSt7hWvZSZcFo/Kozel8qu+1DraPxJ+kPooOMaMePyjQ6cnuufsoYmnYxqZ T1rQA+UnfALbbzp1cMhmz0fNEIj51/i4NvTVF+qicJqp4WyyOff97L2ZjRto8fz0WoWK 1ChvLTXwqffezcoTq4bPr9d4e34iJhFPoUIjE8/CPA2bW2cspO5rVwmZ67L+yN6EwSjl s+B7g/Ea8K/Q7srcLz2+yV77gfMrHXjWrWMGibVtvKFjKRv3n3zHfwsee3TxWFuvfMOb hUew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710913681; x=1711518481; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5LsCb91Rn14BCoqJ2YOQ72ly86SJFJ5OWLOj96pEbOQ=; b=Ff4kmIfNvhiXlzlvUg20yofbvNjQF3wlnXWwRUiNcBkPlAN0fHn6LZFpr7w2WbXzWn +6BPlNufuVspsa56QsPeIPIRPUinYpDfxvRSsY8PS7WRbv/OJzCOaXBwxXNKt9szAtDb wnEeglZfNJd/oZd2zTSOqLrpXo9v0ZjHkS/CXfp/Oq3Mv1S5txmkFT7u8KKz8mMaykGd LIUHE/vGa7bbR02d3WcYd/ykcdpj3NM7KimBxUJ1x+ZoWoq4weJyKV3XWcoNyA1X5/Oj gBZVENkMpcv6ld/LwWipaMk6CO7+GnjyxTrqP0qOmKBF2ffHDQX2p3RF25zzGoRcsrsu XqPw== X-Forwarded-Encrypted: i=1; AJvYcCXbiCZd843dfueYmyOUcvPWjDk1JmKji9TA0JEoSBrxY1eAr+oPndD1XX0QZN8OjWyEZ8ZxAG3ichqabr0JO12TGA3khDD6m0DZPhqgDsrZWyai X-Gm-Message-State: AOJu0YwUsKlCeC8lU9KcfPVV6xJGmZL2Nlg+w43WBPWM6jGXD9LIDkvN f0FT202H7mgLkU2aMwwhiuCMRJqjPrNd6SH6Qghk0TnTptaUiN3/1R1oWl+7RzBHKR0xEd/K/cD +LjJDFgMovHz7Y57CXiik/oGPHksYpca+0go= X-Google-Smtp-Source: AGHT+IHBq/9trY+dEvu3cx/ILTU9PAY3BTx0tXPZ89Whi+bCk4ZrIs2OBa9lvkVFhSYSav9qzTiqSAAnID9A69ZqqbU= X-Received: by 2002:a2e:a592:0:b0:2d4:5ce6:a98b with SMTP id m18-20020a2ea592000000b002d45ce6a98bmr12024415ljp.22.1710913680859; Tue, 19 Mar 2024 22:48:00 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Bharath Rupireddy Date: Wed, 20 Mar 2024 11:17:47 +0530 Message-ID: Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation To: Bertrand Drouvot Cc: shveta malik , Amit Kapila , Nathan Bossart , PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Mar 18, 2024 at 3:42=E2=80=AFPM Bertrand Drouvot wrote: > > Hi, > > Looking at 0001: Thanks for reviewing. > 1 =3D=3D=3D > > + 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 slo= ts."? Will change. > 2 =3D=3D=3D > > @@ -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? Not required I think. One can pick the required columns in the SELECT clause anyways. > 3 =3D=3D=3D > > - * Maps a conflict reason for a replication slot to > + * Maps a invalidation reason for a replication slot to > > s/a invalidation/an invalidation/? Will change. > 4 =3D=3D=3D > > While at it, shouldn't we also rename "conflict" to say "invalidation_cau= se" in > InvalidatePossiblyObsoleteSlot()? That's inline with our understanding about conflict vs invalidation, and keeps the function generic. Will change. > 5 =3D=3D=3D > > + * rows_removed and wal_level_insufficient are only two reasons > > s/are only two/are the only two/? Will change.. --=20 Bharath Rupireddy PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com