RE: [bug fix] Cascaded standby cannot start after a clean shutdown
От | Tsunakawa, Takayuki |
---|---|
Тема | RE: [bug fix] Cascaded standby cannot start after a clean shutdown |
Дата | |
Msg-id | 0A3221C70F24FB45833433255569204D1F8D7667@G01JPEXMBYT05 обсуждение исходный текст |
Ответ на | 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
|
Список | pgsql-hackers |
From: Michael Paquier [mailto:michael@paquier.xyz] > By the way, as long as I have my mind of it. Another strategy would be > to just make the checks in XLogReadRecord() a bit smarter if the whole record > header is not on the page. If we check at least for > AllocSizeIsValid(total_len) then there this code would not fail on an > allocation as you user reported. Still this misses the case where a record > size is lower than 1GB but invalid so you would allocate allocate_recordbuf > for nothing :( That was my first thought, and I gave it up. As you say, XLogReadRecord() could allocate up to 1 GB of memory for a garbage. That allocation can fail due to memory shortage, which prevents the recovery from proceeding. Regards Takayuki Tsunakawa
В списке pgsql-hackers по дате отправления: