Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby
От | Andres Freund |
---|---|
Тема | Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby |
Дата | |
Msg-id | 20160118133815.GT10941@awork2.anarazel.de обсуждение исходный текст |
Ответ на | Re: Re: BUG #13685: Archiving while idle every archive_timeout with wal_level hot_standby (Michael Paquier <michael.paquier@gmail.com>) |
Ответы |
Re: Re: BUG #13685: Archiving while idle every
archive_timeout with wal_level hot_standby
|
Список | pgsql-hackers |
On 2015-12-21 16:26:25 +0900, Michael Paquier wrote: > On Sun, Dec 20, 2015 at 10:14 PM, Michael Paquier > <michael.paquier@gmail.com> wrote: > > Speaking of which, this patch was registered in this CF, I am moving > > it to the next as a bug fix. > > I found a stupid bug in my previous patch: when issuing XLOG_SWITCH it > is possible that the return LSN pointer is on the new segment that has > been forcibly archived if RequestXLogSwitch is called multiple times > and that subsequent calls are not necessary. Patch updated. I find this patch rather unsatisfactory. Yes, it kinda solves the problem of archive timeout, but it leaves the bigger and longer standing problems of unneccessary checkpoints with wal_level=hs in place. It's also somewhat fragile in my opinion. I think we rather want a per backend (or perhaps per wal insertion lock) flag that says 'last relevant record inserted at', and a way to not set that during insertion. Then during a checkpoint or the relevant bgwriter code, we look wether anything relevant happened in any backend since the last time we performed a checkpoint/logged a running xacts snapshot. Greetings, Andres Freund
В списке pgsql-hackers по дате отправления: