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 1nUVG9-0004Wy-7d for pgsql-committers@arkaria.postgresql.org; Wed, 16 Mar 2022 15:08:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nUVG7-0007lM-MM for pgsql-committers@arkaria.postgresql.org; Wed, 16 Mar 2022 15:08:19 +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 1nUVG7-0007lB-As for pgsql-committers@lists.postgresql.org; Wed, 16 Mar 2022 15:08:19 +0000 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nUVG3-0002A7-S8 for pgsql-committers@lists.postgresql.org; Wed, 16 Mar 2022 15:08:18 +0000 Received: by mail-qt1-x832.google.com with SMTP id 11so1973454qtt.9 for ; Wed, 16 Mar 2022 08:08:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rOZFnwvlftTfTexHN+UZaBXKDUff+1z7jNEfuDi2aeI=; b=rvuBRzYdo8kIo0urdC1pO+SCweV7P6xmseSUiNPX7+HySFBM/uFIkPSwumGxBRYDIU T+f1QLoowII2jSnTz9Wxn0gbgDNuM7bQF5s1cz1HloburDspKsoORcrgyyRHqRBTvvTI KdT4P4tGk8t0mCldUu+1vxO0m/7xg8TbWpmoNT3eMxoyPCEVXNXWkhxa6pT6bg2NmVwL JAdufnSLi+okZo1qg4xwZj9e4p7LrHPiL/YWYbJ5Pslu2iTCy/oQhUwQ3yqetHUMi08m bMGlHqedPEa6IqmXolh+ENSPEMZYGu4TErLAUFQ5oV9zSlVH8H8TCphs/hWSWptgVjM8 EYog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rOZFnwvlftTfTexHN+UZaBXKDUff+1z7jNEfuDi2aeI=; b=FW9vHM6ciiFY/2hOS9cLxTnjYxZ4Urq+dTEuv/IgA4ryUnai5WulcEPBuBXaL2FW6c ndoJx33wGAs0pV0ORLo4vybTovqt1330kM4HKLumOMrpg+RweFmDSQ11uwON1mZq/8mP h2C9Kjx6Gi3WWQSewzwvQz4/WTll6yYpopv/nkNt6wBprjjNfgQZm9m400huZ4uaUd4Y EsEigyZGuuGSChY+l81YIqd8cvQige0RoQ3qVrLI98UkS44BzDwIx9iBrHJSwFEb93PH 0aCRt3PUDN3wFyPUqvR+cTn0tGzQm/AuUyjtnTNRuGSYDbcgN6jzUw6BoMfKqyKE0J94 ho6g== X-Gm-Message-State: AOAM531/+Zvp1yFamznVH5fHwT8DP9A1zyu0tBeZ+PMPIjNibUhCUu+z Od/l8pf4bEySlYx/2AZIMfUQSQ== X-Google-Smtp-Source: ABdhPJwysvlNP+z2lFFF9GF/exk/WZKPWRrhfEuy1vZJc+q2VWYJ4s+RMZ4VKAJCLdxZ8Z3J+nXK+A== X-Received: by 2002:a05:622a:11cb:b0:2e1:a301:2d1d with SMTP id n11-20020a05622a11cb00b002e1a3012d1dmr350238qtk.145.1647443293729; Wed, 16 Mar 2022 08:08:13 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id z8-20020ac87f88000000b002e1cecad0e4sm1473690qtj.33.2022.03.16.08.08.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Mar 2022 08:08:13 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 51A9F802A96; Wed, 16 Mar 2022 10:08:12 -0500 (CDT) Date: Wed, 16 Mar 2022 10:08:12 -0500 From: Justin Pryzby To: Robert Haas Cc: Michael Paquier , pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Allow extensions to add new backup targets. Message-ID: <20220316150812.GA28503@telsasoft.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Mar 16, 2022 at 09:52:41AM -0400, Robert Haas wrote: > On Wed, Mar 16, 2022 at 5:36 AM Michael Paquier wrote: > > I have noticed that this commit produces a warning when building with > > MSVC, as of the end of BaseBackupGetTargetHandle() when the target > > cannot be found. I guess that you'd better add a fake return NULL to > > keep such compilers quiet about that, like that: > > +++ b/src/backend/replication/basebackup_target.c > > @@ -144,6 +144,9 @@ BaseBackupGetTargetHandle(char *target, char *target_detail) > > ereport(ERROR, > > (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), > > errmsg("unrecognized target: \"%s\"", target))); > > + > > + /* keep compiler quiet */ > > + return NULL; > > } > > Done. > > It sucks that I keep missing this point. And it also sucks that we > have to have this kind of stuff. :-( FYI - at some point, CI will catch these in advance, per Andres' suggestion on the big "basebackup" thread. https://github.com/justinpryzby/postgres/commit/451e522a26f2b9a62976834ef7848279514ca700 -- Justin