Re-archive the WAL on standby with archive_mode=always?

Поиск
Список
Период
Сортировка
От Japin Li
Тема Re-archive the WAL on standby with archive_mode=always?
Дата
Msg-id ME0P300MB0445CFEF72BF6D2030769F6EB65DA@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответы Re: Re-archive the WAL on standby with archive_mode=always?
Список pgsql-hackers
Hi, hackers,

I was recently reviewing the KeepFileRestoredFromArchive() function and came
across a section that raised a question for me:

    /*
     * Create .done file forcibly to prevent the restored segment from being
     * archived again later.
     */
    if (XLogArchiveMode != ARCHIVE_MODE_ALWAYS)
        XLogArchiveForceDone(xlogfname);
    else
        XLogArchiveNotify(xlogfname);

My understanding is that the WAL segment in this context has just been
restored from the archive.

However, for archive_mode=always, the code calls XLogArchiveNotify(xlogfname),
which, if I understand correctly, signals the archiver to re-archive this
already-archived WAL segment.

Is there a specific scenario or benefit I'm overlooking?

-- 
Regards,
Japin Li



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