Re: Disable WAL logging to speed up data loading
| От | Laurenz Albe |
|---|---|
| Тема | Re: Disable WAL logging to speed up data loading |
| Дата | |
| Msg-id | d7d00ef78c952c6a3ad1b49386c9359235b78297.camel@cybertec.at обсуждение исходный текст |
| Ответ на | Re: Disable WAL logging to speed up data loading (Fujii Masao <masao.fujii@oss.nttdata.com>) |
| Список | pgsql-hackers |
On Fri, 2020-10-30 at 05:00 +0900, Fujii Masao wrote:
> > But as I said in the other thread, changing wal_level emits a WAL
> > record, and I am sure that recovery will refuse to proceed if
> > wal_level < replica.
>
> Yes. What I meant was such a safe guard needs to be implemented.
That should be easy; just modify this code:
static void
CheckRequiredParameterValues(void)
{
/*
* For archive recovery, the WAL must be generated with at least 'replica'
* wal_level.
*/
if (ArchiveRecoveryRequested &&
ControlFile->wal_level == WAL_LEVEL_MINIMAL)
{
ereport(WARNING,
(errmsg("WAL was generated with wal_level=minimal, data may be missing"),
errhint("This happens
if you temporarily set wal_level=minimal without taking a new base backup.")));
}
so that it tests
if (ArchiveRecoveryRequested && ControlFile->wal_level <= WAL_LEVEL_MINIMAL)
and we should be safe.
Yours,
Laurenz Albe
В списке pgsql-hackers по дате отправления: