Re: [HACKERS] BRIN desummarization writes junk WAL records

2017-04-07 Thread Alvaro Herrera
Tom Lane wrote: > The proximate cause of the exception seems to be that > brinSetHeapBlockItemptr is being passed pagesPerRange = 0, > which is problematic since HEAPBLK_TO_REVMAP_INDEX tries to > divide by that. Looking one level down, the bogus value > seems to be coming out of an xl_brin_desum

[HACKERS] BRIN desummarization writes junk WAL records

2017-04-06 Thread Tom Lane
I am seeing the database fail to restart after a crash during the regression tests, due to a divide-by-zero fault in BRIN wal replay. Core was generated by `postgres: startup'. Program terminated with signal 8, Arithmetic exception. #0 brinSetHeapBlockItemptr (buf=, pagesPerRange=0, heapBlk=