Re: [bug fix] Cascaded standby cannot start after a clean shutdown

Поиск
Список
Период
Сортировка
Искать
От
Michael Paquier
Тема
Re: [bug fix] Cascaded standby cannot start after a clean shutdown
Дата
Msg-id
20180612055317.GD31779@paquier.xyz
Ответ на
Список
Дерево обсуждения
[bug fix] Cascaded standby cannot start after a clean shutdown "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
RE: [bug fix] Cascaded standby cannot start after a clean shutdown "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
RE: [bug fix] Cascaded standby cannot start after a clean shutdown "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
RE: [bug fix] Cascaded standby cannot start after a clean shutdown "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
RE: [bug fix] Cascaded standby cannot start after a clean shutdown "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
RE: [bug fix] Cascaded standby cannot start after a clean shutdown "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
RE: [bug fix] Cascaded standby cannot start after a clean shutdown "Tsunakawa, Takayuki" <tsunakawa.takay@jp.fujitsu.com>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Tom Lane <tgl@sss.pgh.pa.us>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Andres Freund <andres@anarazel.de>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
Re: [bug fix] Cascaded standby cannot start after a clean shutdown Michael Paquier <michael@paquier.xyz>
On Sun, Mar 18, 2018 at 08:49:01AM +0900, Michael Paquier wrote:
> On Fri, Mar 16, 2018 at 06:02:25AM +0000, Tsunakawa, Takayuki wrote:
>> Ouch, you're right.  If memory allocation fails, the startup process
>> would emit a LOG message and continue to fetch new WAL records.  Then,
>> I'm completely happy with your patch.
> 
> Thanks for double-checking, Tsunakawa-san.

As this is one of those small bug fixes for which we can do something,
attached is an updated patch with a commit description, and
tutti-quanti.  At the end, I have moved the size check within
allocate_recordbuf().  Even if the size calculated is not going to be
higher than total_len, it feels safer in the long term for two reasons:
- Allocation size calculation could be changed, or let's say made
smarter.
- New callers of allocate_recordbuf would not be able to see the problem
for the backend, and this could become a problem if the WAL reader
facility is extended.

Thoughts?
--
Michael
В списке pgsql-hackers по дате отправления
От: Michael Paquier
Дата:
От: Tsunakawa, Takayuki
Дата:
FAQ