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 1rwTWs-0022sS-KV for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Apr 2024 21:06:18 +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 1rwTWr-00FttX-4z for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Apr 2024 21:06:17 +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 1rwTWq-00FttL-RS for pgsql-hackers@lists.postgresql.org; Mon, 15 Apr 2024 21:06:16 +0000 Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1rwTWm-0031dv-3E for pgsql-hackers@lists.postgresql.org; Mon, 15 Apr 2024 21:06:15 +0000 Received: by mail-lf1-x143.google.com with SMTP id 2adb3069b0e04-518a56cdbcfso3796117e87.2 for ; Mon, 15 Apr 2024 14:06:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=neon.tech; s=google; t=1713215170; x=1713819970; darn=lists.postgresql.org; h=in-reply-to:references:from:to:subject:cc:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=CqUS6iuYRPasSPTHMmjHuXzJ0pdSjW7CMM0zxGQp3BQ=; b=rYWILjUSPXSiKUQ/TTYpyYc9f9A24AF/tj5WKtlylQ60BSZmdraolz3kaxonG7FHI1 D3eYLAp8fZj6DMxwwgb+SKBDlmTi+j1iEltA6I45Mm2pZeUBLfFXX7gg2uZb2/qYU/S1 JnxtuLLe+2W3pA7Xfo4d6NG9S0xCQwfxZfAVo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713215170; x=1713819970; h=in-reply-to:references:from:to:subject:cc:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=CqUS6iuYRPasSPTHMmjHuXzJ0pdSjW7CMM0zxGQp3BQ=; b=Vzi/2cWuTD6QolbuCqnQiOJlji9NdcfEWCt5vkp226Jeh6SZXlQp/V3QdxkS4JwB1+ Wyzox4D7zM7AOyuP7XLem22Q4OCDNQZQqmyXr+I2dmj2XY62DAAoPfVflLan+UF86D0o 6OT/8KOJ4bolnfhpmtINbw8mMGXt56WPzf6VzV+u3jpEluVr8JfXsFrO7GClyeHW4vJ+ 4ZyumQ4fQ6ZAvORKDBn4ASap+kUvlnm32BpsfK/M9+ePDFifeL//jj/lpcib/iEfBNzM TpPC5bUzeYkznN6W+kbU5uPlCiXTBUnzFv41O7xoUjOvy+xcV4AHUJI6lyMeXeYaQUTA N9pg== X-Gm-Message-State: AOJu0YwFzuwJRBKyjLPwCEEyE8THHcAF7L02nu0yBNUfVRFQf+3MBsNB 3cjspmwXututZbgjVgJgHQGWN9hQd3YFXzoIPR0OZ18mfyrr8cTnVci6ZZXUs3iXt2UJH0ED1Nc P/dYOsBsWi8A= X-Google-Smtp-Source: AGHT+IEW8eFdfPPJm3zjynCZpVDbbW2YsRquMYlsekX4om6esm+9Md3fjzuSvqINKuX9EGj/dQozNg== X-Received: by 2002:a05:6512:2211:b0:518:dc4c:20fa with SMTP id h17-20020a056512221100b00518dc4c20famr5175727lfu.15.1713215169646; Mon, 15 Apr 2024 14:06:09 -0700 (PDT) Received: from localhost ([212.174.35.38]) by smtp.gmail.com with ESMTPSA id x2-20020a170906b08200b00a4e5a6b57a2sm5857334ejy.163.2024.04.15.14.06.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Apr 2024 14:06:09 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8; format=Flowed Date: Mon, 15 Apr 2024 16:06:03 -0500 Message-Id: Cc: Subject: Re: SQL function which allows to distinguish a server being in point in time recovery mode and an ordinary replica To: From: "Tristan Partin" X-Mailer: aerc 0.17.0-118-g0a1af14fd916 References: <06c02ef916d85e77778e5cdfdf67a3df@postgrespro.ru> In-Reply-To: <06c02ef916d85e77778e5cdfdf67a3df@postgrespro.ru> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Tue Mar 26, 2024 at 9:28 AM CDT, m.litsarev wrote: > Hi, > > At present time, an existing pg_is_in_recovery() method is not enough > to distinguish a server being in point in time recovery (PITR) mode and= =20 > an ordinary replica > because it returns true in both cases. > > That is why pg_is_standby_requested() function introduced in attached=20 > patch might help. > It reports whether a standby.signal file was found in the data directory= =20 > at startup process. > Instructions for reproducing the possible use case are also attached. > > Hope it will be usefull. Hey Mikhail, Saw your patch for the first time today. Looks like your patch is messed=20 up? You seem to have more of the diff at the bottom which seems to add=20 a test. Want to send a v2 with a properly formatted patch? Example command: git format-patch -v2 -M HEAD^ --=20 Tristan Partin Neon (https://neon.tech)