pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Robert Haas <rhaas@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Allow extensions to add new backup targets.
Date: Wed, 16 Mar 2022 18:36:43 +0900
Message-ID: <YjGvq4zPDT6j15go@paquier.xyz> (raw)
In-Reply-To: <E1nUB2m-000CYC-D5@gemulon.postgresql.org>
References: <E1nUB2m-000CYC-D5@gemulon.postgresql.org>

Hi Robert,

On Tue, Mar 15, 2022 at 05:33:12PM +0000, Robert Haas wrote:
> Allow extensions to add new backup targets.
> 
> Commit 3500ccc39b0dadd1068a03938e4b8ff562587ccc allowed for base backup
> targets, meaning that we could do something with the backup other than
> send it to the client, but all of those targets had to be baked in to
> the core code. This commit makes it possible for extensions to define
> additional backup targets.

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;
 }

Thanks,
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (7+ messages)  latest in thread

Message-ID: <YjGvq4zPDT6j15go@paquier.xyz>
Permalink:  ../YjGvq4zPDT6j15go@paquier.xyz/
Also on:    postgresql.org/message-id/YjGvq4zPDT6j15go@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, rhaas@postgresql.org
  Subject: Re: pgsql: Allow extensions to add new backup targets.
  In-Reply-To: <YjGvq4zPDT6j15go@paquier.xyz>
  References: <E1nUB2m-000CYC-D5@gemulon.postgresql.org> <YjGvq4zPDT6j15go@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox