Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1meulH-0003nX-AZ for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Oct 2021 07:51:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1meulG-0005Rn-94 for pgsql-hackers@arkaria.postgresql.org; Mon, 25 Oct 2021 07:51:14 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1meukw-0001GR-WF for pgsql-hackers@lists.postgresql.org; Mon, 25 Oct 2021 07:50:55 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1meuku-0006mF-M3 for pgsql-hackers@lists.postgresql.org; Mon, 25 Oct 2021 07:50:54 +0000 Received: by mail-wm1-x333.google.com with SMTP id a20-20020a1c7f14000000b003231d13ee3cso12078994wmd.3 for ; Mon, 25 Oct 2021 00:50:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aiven.io; s=google; h=from:to:cc:subject:date:message-id:organization:in-reply-to :references:mime-version:content-transfer-encoding; bh=hGSDnQ1ii3Sz/GZF03rx4CbLK5kdENoImXSKXBXtOwk=; b=aQcksul5DEAPpVVYxnwKdejv76zl9Cq1MwDttQz7DjO7mI+2SK3vtvm6G5nZzMNSUM MAnqsvLUGA6YDlczRukBK5LBNxmksN0CBm9qLGGw8h78lhoLyEbW4GIgWIU+HUmFT1kR vqszMkGHRhRnGwp/DjjZWVPePdW5FvotLvi5Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :in-reply-to:references:mime-version:content-transfer-encoding; bh=hGSDnQ1ii3Sz/GZF03rx4CbLK5kdENoImXSKXBXtOwk=; b=1Na+beBUE7sX90BpGE0AUW5LLLoh5v+WfVKqhzKsGc0OomO58uM1nrVcka9ajBXWA3 QSh4DUC4iSeYqeOwHJt0tsildKw5THNCnuZh4mweLwqLyXjn+3AWbcNeCHpeTNFJg91w oxERFGx7+5JFK/JkcckeIMtdsDLdz+TL6fO7RDqGlt1PKKZv0IB2f0nld5/yny5zFECu Jb45fyhmzDTsvsbT2SplRDSO+42u9iGJCuivka11GmkI6e6Q7E1E7qGc6qryxTLMoWeA K2FR8oylPMq7eSDnmyy0ri6rnMLJp2lalg+1X9e1cb5nKY/qFz40JYoMlqwd/6pDl+k0 LAqw== X-Gm-Message-State: AOAM532QS+Ps/o+ulZVZ9Mtcz6FqscUNRujSIlYsA+CTE7H5N0XxsJCC YYwsTZKiRbt9F5YGaL7Oy71Kpg== X-Google-Smtp-Source: ABdhPJye0FjM+uyq1NpH8m9I8MDPJOOPDummdCpWOH511mDNpMxd7CH9KyEm6anRcybv+NxblR6YNg== X-Received: by 2002:a1c:155:: with SMTP id 82mr19472457wmb.191.1635148251762; Mon, 25 Oct 2021 00:50:51 -0700 (PDT) Received: from aivenronan.localnet (static-176-158-121-96.ftth.abo.bbox.fr. [176.158.121.96]) by smtp.gmail.com with ESMTPSA id b4sm798051wri.46.2021.10.25.00.50.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Oct 2021 00:50:51 -0700 (PDT) From: Ronan Dunklau To: Michael Paquier Cc: pgsql-hackers@lists.postgresql.org, Bharath Rupireddy , Kyotaro Horiguchi , Masahiko Sawada Subject: Re: pg_receivewal starting position Date: Mon, 25 Oct 2021 09:50:01 +0200 Message-ID: <3162614.44csPzL39Z@aivenronan> Organization: aiven In-Reply-To: References: <5781690.lOV4Wx5bFT@aivenronan> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Le lundi 25 octobre 2021, 09:40:10 CEST Michael Paquier a =E9crit : > On Mon, Oct 25, 2021 at 09:15:32AM +0200, Ronan Dunklau wrote: > > Does it make sense though ? The NULL slot_name case handling is pretty > > straight forward has it will be handled by string formatting, but in the > > case of a null restart_lsn, we have no way of knowing if the command was > > issued at all. >=20 > If I am following your point, I don't think that it matters much here, > and it seems useful to me to be able to pass NULL for both of them, so > as one can check if the slot exists or not with an API designed this > way. You're right, but I'm afraid we would have to check the server version twic= e=20 in any case different from the basic pg_receivewal on (once in the function= =20 itself, and one before calling it if we want a meaningful result). Maybe we= =20 should move the version check outside the GetSlotInformation function to av= oid=20 this, and let it fail with a syntax error when the server doesn't support i= t ? =2D-=20 Ronan Dunklau