Checking MINIMUM_VERSION_FOR_WAL_SUMMARIES

Поиск
Список
Период
Сортировка
От Artur Zakirov
Тема Checking MINIMUM_VERSION_FOR_WAL_SUMMARIES
Дата
Msg-id CAKNkYnzkkQ0gb_ZmLTY0r2-qV1q6imXgcCWxdA6UoA6yJkujGg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Checking MINIMUM_VERSION_FOR_WAL_SUMMARIES  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Re: Checking MINIMUM_VERSION_FOR_WAL_SUMMARIES  (Yugo NAGATA <nagata@sraoss.co.jp>)
Список pgsql-hackers
Hi hackers,

during reading the source code of new incremental backup functionality
I noticed that the following condition can by unintentional:

    /*
     * For newer server versions, likewise create pg_wal/summaries
     */
    if (PQserverVersion(conn) < MINIMUM_VERSION_FOR_WAL_SUMMARIES)
    {
        ...

        if (pg_mkdir_p(summarydir, pg_dir_create_mode) != 0 &&
            errno != EEXIST)
            pg_fatal("could not create directory \"%s\": %m", summarydir);
    }

This is from src/bin/pg_basebackup/pg_basebackup.c.

Is the condition correct? Shouldn't it be ">=". Otherwise the function
will create "/summaries" only for older PostgreSQL versions.

I've attached a patch to fix it in case this is a typo.

-- 
Artur

Вложения

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

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: [Doc] Improve hostssl related descriptions and option presentation
Следующее
От: John Morris
Дата:
Сообщение: Re: Where can I find the doxyfile?