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 1sm3bQ-002u8g-Uc for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Sep 2024 03:56:13 +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 1sm3bP-002Hfc-09 for pgsql-hackers@arkaria.postgresql.org; Thu, 05 Sep 2024 03:56:11 +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 1sm3bO-002Hen-MF for pgsql-hackers@lists.postgresql.org; Thu, 05 Sep 2024 03:56:11 +0000 Received: from mail-oa1-x2e.google.com ([2001:4860:4864:20::2e]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sm3bJ-000Dxs-4R for pgsql-hackers@lists.postgresql.org; Thu, 05 Sep 2024 03:56:09 +0000 Received: by mail-oa1-x2e.google.com with SMTP id 586e51a60fabf-277e4327c99so226988fac.0 for ; Wed, 04 Sep 2024 20:56:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725508563; x=1726113363; 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=jted3ZD5mdUA7dCDi8Bi4kvAuftBWKVeZ0rRKdRdMkY=; b=QAwPtSf6Rf+1t/Zez1H76iLQRJN3ReJiLOise+SVdOIcsxRLJlG+9CCoyFmCjVZ/YO hMFhfJTVTFnNtAtJ8Y9eVQsyOkqk+Zjgbk777nfU7JOr6S3n/GD9Dxf3E4rxyELR8WkG 3Ej91FMpP0Iigp8EADH3uztPyudVGS6473CGDri7elxy88j5TKS1/DweVKFXg2BcqnF3 KT4eElcvoNypY9g4NBSpdWrCrROrDGMpexJRmlNTo67B3BXOdXxvrweQPLXjRl8nE2nN NJnnWfBhpS+OHwETEg25nzrO/cJxCpx320lckBcFrDCD7JwlrzgTMd2R0NnfaV7wvttH xxpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725508563; x=1726113363; 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=jted3ZD5mdUA7dCDi8Bi4kvAuftBWKVeZ0rRKdRdMkY=; b=GBpNzJdV7N3MLcNVSunJtFsO5VqejZfTJu74ms0WSlRH1huEFkWT4hewvU7HbX84KW jTJBSe5qLTyM0KGqMALvUkzYXkHi7Z3yRkqnAaWv/qf/a0YCrT4Es3dezw5WYIMm7JIh 8R3t32BlVgsDHonfs5p07Ove78uvqN0FBnSnNgjnGbtsYBRwoLnyVtR6gFkanHmJcG0m 1SAJNFwY+dN1E2QkELXkQQ0sEKnCSiX4l9AJdxeQp8EPFWA2JvKAsDvQBfGnpOm01WBR Ni7Yi3Ipa9VVuJ3QaJd9Z0XHVVEoaqUjTMkpn/MkjsXBzeNxRt7bpAL8+hCyuSBvSdQ/ 89Sg== X-Forwarded-Encrypted: i=1; AJvYcCW4ksEQMwMCE6C4luPU1EXaCBKLHpltRfYIlu49/u9mJuRWSO7NxOdkG1JrFC+6UOC1D1lq4LcKkVFaOgme@lists.postgresql.org X-Gm-Message-State: AOJu0YwtUXxY8t8uKXjN0BfX3aBwBtUTNKOEQKplB7iv0l/GRzTzg84K 20R2u5NAFxemXQtflut8j6KMv2PqQceebWSzjJ3bdgr9b2U4Fit6l/uThoCtCQwIx707Fy5aNCa Cs9Kv8phzhPrh9urB9sCpyn7OzYLWVA== X-Google-Smtp-Source: AGHT+IHDLo/OULEHrWfMTsVDvE5oJt3u0THwTLNC63j/4PhGaGGohxI0Cppt+gQUxpKnEDEtE6kd5pWxmx02QNz2rbQ= X-Received: by 2002:a05:6871:5d1:b0:268:2efa:2de0 with SMTP id 586e51a60fabf-277d03ab0dcmr18733085fac.13.1725508562811; Wed, 04 Sep 2024 20:56:02 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Amit Kapila Date: Thu, 5 Sep 2024 09:25:51 +0530 Message-ID: Subject: Re: Introduce XID age and inactive timeout based replication slot invalidation To: shveta malik Cc: Bharath Rupireddy , Peter Smith , Ajin Cherian , Bertrand Drouvot , Masahiko Sawada , 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 Wed, Sep 4, 2024 at 2:49=E2=80=AFPM shveta malik wrote: > > On Wed, Sep 4, 2024 at 9:17=E2=80=AFAM shveta malik wrote: > > > > On Tue, Sep 3, 2024 at 3:01=E2=80=AFPM shveta malik wrote: > > > > > > > > > 1) > It is related to one of my previous comments (pt 3 in [1]) where I > stated that inactive_since should not keep on changing once a slot is > invalidated. > Agreed. Updating the inactive_since for a slot that is already invalid is misleading. > > > 2) > One more issue in this message is, once I set > replication_slot_inactive_timeout to a bigger value, it becomes more > misleading. This is because invalidation was done in the past using > previous value while message starts showing new value: > > ALTER SYSTEM SET replication_slot_inactive_timeout TO '36h'; > > --see 129600 secs in DETAIL and the current time. > postgres=3D# SELECT * FROM pg_replication_slot_advance('mysubnew1_1', > pg_current_wal_lsn()); > ERROR: can no longer get changes from replication slot "mysubnew1_1" > DETAIL: The slot became invalid because it was inactive since > 2024-09-04 10:06:38.980939+05:30, which is more than 129600 seconds > ago. > postgres=3D# select now(); > now > ---------------------------------- > 2024-09-04 10:07:35.201894+05:30 > > I feel we should change this message itself. > +1. --=20 With Regards, Amit Kapila.