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 1uKbvS-007eeM-Nu for pgsql-hackers@arkaria.postgresql.org; Thu, 29 May 2025 11:59:58 +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 1uKbvR-008HRr-1k for pgsql-hackers@arkaria.postgresql.org; Thu, 29 May 2025 11:59:57 +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 1uKbvQ-008HRi-O5 for pgsql-hackers@lists.postgresql.org; Thu, 29 May 2025 11:59:56 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1uKbvO-000XDy-2n for pgsql-hackers@postgresql.org; Thu, 29 May 2025 11:59:55 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-ad88eb71eb5so96622866b.0 for ; Thu, 29 May 2025 04:59:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1748519993; x=1749124793; 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=WqooF1TNYib7gKu6mlt8iaAaJAT9tvEjddBnkqdXJfg=; b=V+UQkBjjarJxlUUEmvB7YiIW9Wvh1XNK+Bn0H9L2AgOkHTBhlmXoepLTeIfOR9ds2f yw/uq7tO8Xph95cNZmGa30uYiTBo4WRtD4hTjtcB3KQ8NxfpFBZsN8jGL+UgrmxaDF3e dKaklea3UfJV9EqCyMdPTi/zJMF7IqocxA8m++0spD59lFTdmOyC4AubUesoomjbEvwH HbEn3AWKEd9IGmKgCwiWIohH4tkoe2bbJV1FDFUMdTF8QBj2Pb414rZ27b9ywYtkPruo i57ZKq6zokkrnc0yi2yAkqK1k6ynHhQ+1QwX080qpjKII2hwYd/QgFm8pKKTAFluemEL dfbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748519993; x=1749124793; 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=WqooF1TNYib7gKu6mlt8iaAaJAT9tvEjddBnkqdXJfg=; b=iRPsdsADumAPNICScfs+BQh3etSgHZkYqh/ab9mEeBHNZFP+5olnfA5cgoOjyzJvcc dXhuh6+DiktxVEoKiRDLiafxs2La3kYF5XOfivsfWAjfvCGrMu+n0k0O7KWXr/kxG0TR O0XXC4XHwaOr2VssX/5eB5VtuLmT6hdcOK0cop6+zlI5cK280a/gV6KSplSIkinZ/HoB WOZiIOsefK3VoqO1UIDugAbyvwRE9GN79MK+6Ld2LngZK1MsqinLDuSdN4u8R8+SyuwS XhhhnKf5FoIfueC1DpWqmi/3MxQAlfh5YBooGKN6Y3td8x/xYf22I8A5rdUcJyerEqv9 rJww== X-Forwarded-Encrypted: i=1; AJvYcCX3+SUn3xxLB1xWJ75hklM6fOVgL1HNYtQu/m+qKKJhMogWIXG4NRlpziPIpFRIkrk5pnwDbUTXAXXwDT6W@postgresql.org X-Gm-Message-State: AOJu0YyfqAyQmsGp/44iDqv4n1XKlE/l2zUYGKx7lwjqp19x77z+foQL Pbmq6JEdd5CV44GypR9njBqory5V+S3t02EjD16NWUKk4x89Ys3n+oaGtWM4C0CYvBl7xGjreXW 5FLMDfWVDQMpjsAlkUVqMjCDrBVafx3I= X-Gm-Gg: ASbGncvPUm+0R8PxIJbK0gWkOJBSo4feOG54y8QPOOjq6ZvQA+zduGRUb7VcHYoDpuZ O3iDAjRr0opZ5E7wLPE53++eePI8S98BPm2I76MeRqrSv7JkDopqp+YQh28lm6NR59H2EeaByox rmzwVt1saKAKlXkGByN09j6CIp4SWAzYCEFn8UuzJt6b4= X-Google-Smtp-Source: AGHT+IFcS2SVSeqbffoIDXIufx1aa59oS95gFal1qKfTxHQReQDGZNxHWAHXfhbGyMPKJzJl2rUNnOm7kz007al3WEo= X-Received: by 2002:a17:907:3d8f:b0:ad8:9b5d:2c16 with SMTP id a640c23a62f3a-adacda55cf1mr196567866b.11.1748519992399; Thu, 29 May 2025 04:59:52 -0700 (PDT) MIME-Version: 1.0 References: <1d12d2-67235980-35-19a406a0@63439497> <683f3c82-d38e-436d-88fd-27722af62005@vondra.me> <8679fea7-94ce-4a52-8e48-1a8cd0857fcb@vondra.me> <135e8-675c4600-21-304d7f40@228322535> <1538a2-67c5c700-7-77ec5a80@179382871> <27589a-680a4b80-6d-6e07880@117064404> <3ea6a1-68150580-1-7b53be0@80017081> <309f08-682ca380-25-139bf240@62751029> <2c1d-68344100-b7-3411b8c0@256938178> In-Reply-To: From: Alexander Korotkov Date: Thu, 29 May 2025 14:59:39 +0300 X-Gm-Features: AX0GCFv68L00v1mzcb9CFpCcfTpZPcx-mZlRhv6Ydm0L_3qC4CgbKmFVaGGWrjA Message-ID: Subject: Re: Slot's restart_lsn may point to removed WAL segment after hard restart unexpectedly To: Amit Kapila Cc: Vitaly Davydov , pgsql-hackers , Masahiko Sawada , tomas@vondra.me 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 Tue, May 27, 2025 at 2:26=E2=80=AFPM Amit Kapila wrote: > Yeah, we should be able to change ABI during beta, but I can't comment > on the idea of effective_restart_lsn without seeing the patch or a > detailed explanation of this idea. Could you, please, check the patch [1]. It implements this idea except it names new field restart_lsn_flushed instead of effective_restart_lsn. > Now, you see my point related to restart_lsn computation for logical > slots, it is better to also do some analysis of the problem related to > xmin I have highlighted in one of my previous emails [1]. I see your > response to it, but I feel someone needs to give it a try by writing a > test and see the behavior. I am saying because logical slots took > precaution of flushing to disk before updating shared values of xmin > for a reason, whereas similar precautions are not taken for physical > slots, so there could be a problem with that computation as well. I see LogicalConfirmReceivedLocation() performs correctly while updating effective_catalog_xmin only after syncing the slot to the disk. I don't see how effective_xmin gets updates with the logical replication progress though. Could you get me some clue on this, please? Links. 1. https://www.postgresql.org/message-id/1538a2-67c5c700-7-77ec5a80%4017938= 2871 ------ Regards, Alexander Korotkov Supabase