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 1uULS9-001m9S-QS for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Jun 2025 08:25:57 +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 1uULS7-001LJI-Mk for pgsql-hackers@arkaria.postgresql.org; Wed, 25 Jun 2025 08:25:56 +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 1uULS7-001LJA-DD for pgsql-hackers@lists.postgresql.org; Wed, 25 Jun 2025 08:25:56 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uULS5-003zEy-2I for pgsql-hackers@postgresql.org; Wed, 25 Jun 2025 08:25:55 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-553644b8f56so1294223e87.1 for ; Wed, 25 Jun 2025 01:25:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1750839953; x=1751444753; darn=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=wcfyFJNwm/cMyW1Qv2ENTJWLG6tH+9YrBZWEYiNtGwk=; b=T5kMAwow8muUqend/l/3jJWlw6vFlIryZr0y+XqssFvkFqosEN2yC8B7RPQLLHpL3e 1O9eVKQ3mU3wR7JyQUXhBKFkggQbq7+MLyt6aqNXqvjcUvftLl/hRURWLG7ax5BSpzQd 7ANZkJLzaZj47KdT5wKzAvzRQrSerilOMCksR1RJBLvWyUWWsKYEIUW18kwGRwxPJLou 0eIHnkwnGfVzdpIJ0Yx9C7VlbPWShUHwj6Ba77/G1Yah3lJs7/ij2sIcf8TIQw6z8S9Y 1l23nwJKcoQC38f2xY8ejxgZnUov8eCg2Jcsbfv8S7fom7+qaQ1cD2Wz1iqx5x/+57Ka Dhpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1750839953; x=1751444753; 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=wcfyFJNwm/cMyW1Qv2ENTJWLG6tH+9YrBZWEYiNtGwk=; b=evjXG5FXXbAanIaINRwizjqEvDLKDE5kdf1pSbwt+0FhEmNFTMH8b8XSOUY2gJY91r 58jM2aLgzejOA2DppGh93SZ7tX/OxDEPKzM6IaMNfzEVrfQakkQrYCvDqhJEynIhiMrL iZj765kWU3SRk1l5mZkhUtGEmFsDYSkBzKF5RhpNL7zQFL+uzznabYRX3D/c3y0jVIg7 TY0k20sAVLf/RyVNnp0l+cRRB0BDk4AsksvLFRWGM88VXLLd/bAneh4FqTLGFGbaTbtr paiuS8tv5OpTIaTgxcL5TJOf2QQV+Qh+L8KKXyPMRUbSTyIA2N+5C0HHpY4SBbGdn+tK 5qBg== X-Forwarded-Encrypted: i=1; AJvYcCXZE7U55b4He2tMg6b3YiBg2MUy7EEuyum3ey5Fo5oAc/CIQ5VSXvIhqC0wZYv68kgHofPkYvPFHn9RGWB5@postgresql.org X-Gm-Message-State: AOJu0Yx9+xSvVVavFVggWNKN0H/ibRCLrnSC0C13X9et/49f08Xo0OCl E6q4SKdeHuI7C10GnZCmvJ4WzOcKopELGV5w+qhTruCR5Z4hUi13NFtL5arL+jCA8W1agX9FCRc 03zF85ooD2UTcuJx4imIRrDc/hklNoeU= X-Gm-Gg: ASbGncuJ2n45JZ78wbQEtaF4jomhPObqogf350rOVPuPvPsDP7OUZXWub591m8DYKSR xVtF+Ld6lBUUiqxIzNGOF3gtdXPgBPYqov1koxDiTDbECqNdoTEMphH39zgZUcg9IDwx8Ta8owQ H7vmcgwCEbUbDWg0aEy4f+Tki5s3RGCiYf/7UN5+xRGapq X-Google-Smtp-Source: AGHT+IEIW6nY9B1hxJgUvQTMdOzBwvjkB25HUxgBdak0EmbfhBR+IYNHIbRFUE6Fcj1e2U+5bsqQvPFRMUWppyqRXI4= X-Received: by 2002:a05:6512:3d88:b0:553:2eff:8d74 with SMTP id 2adb3069b0e04-554fdfa2006mr668602e87.42.1750839952376; Wed, 25 Jun 2025 01:25:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Dilip Kumar Date: Wed, 25 Jun 2025 13:55:34 +0530 X-Gm-Features: Ac12FXwkcu2t6hLQ9hfXA-mz9x5iaY-rjitC-yUnX9uHg2trrZPPWpPz7-B7pVs Message-ID: Subject: Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly To: "Hayato Kuroda (Fujitsu)" Cc: "Zhijie Hou (Fujitsu)" , Alexander Korotkov , Amit Kapila , Vitaly Davydov , Tom Lane , Alexander Lakhin , pgsql-hackers , Masahiko Sawada , "tomas@vondra.me" , vignesh C 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, Jun 25, 2025 at 1:18=E2=80=AFPM Hayato Kuroda (Fujitsu) wrote: > > Dear Dilip, > > Another idea is to call ReplicationSlotsComputeRequiredLSN() when at leas= t one > of the restart_lsn is updated, like attached. I feel this could reduce th= e computation > bit more. Right, that makes sense, if there is nothing updated on disk then we can avoid computing this. --=20 Regards, Dilip Kumar Google