Re: pgsql: Allow extensions to add new backup targets.

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Allow extensions to add new backup targets.
Date: 2022-03-16 15:08:12
Message-ID: 20220316150812.GA28503@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Wed, Mar 16, 2022 at 09:52:41AM -0400, Robert Haas wrote:
> On Wed, Mar 16, 2022 at 5:36 AM Michael Paquier <michael(at)paquier(dot)xyz> 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

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Tomas Vondra 2022-03-16 17:06:13 pgsql: Fix publish_as_relid with multiple publications
Previous Message David Steele 2022-03-16 14:29:17 Re: pgsql: Fix pg_basebackup with in-place tablespaces.