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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: pgsql: Allow extensions to add new backup targets.
Дата
Msg-id YjGvq4zPDT6j15go@paquier.xyz
обсуждение исходный текст
Ответ на pgsql: Allow extensions to add new backup targets.  (Robert Haas <rhaas@postgresql.org>)
Ответы Re: pgsql: Allow extensions to add new backup targets.  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-committers
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

Вложения

В списке pgsql-committers по дате отправления:

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: pgsql: Fix default signature length for gist_ltree_ops
Следующее
От: Daniel Gustafsson
Дата:
Сообщение: pgsql: doc: Ensure intermediate path creation with mkdir