Re: Reviewing freeze map code
От | Robert Haas |
---|---|
Тема | Re: Reviewing freeze map code |
Дата | |
Msg-id | CA+Tgmoa5q7Ug=Uouujgh=YEuZDYvONy25WL93Bm_5x1BnUBr8g@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Reviewing freeze map code (Amit Kapila <amit.kapila16@gmail.com>) |
Список | pgsql-hackers |
On Wed, Jun 15, 2016 at 9:59 AM, Amit Kapila <amit.kapila16@gmail.com> wrote: >> That just kicks the can down the road. Then you have PD_ALL_VISIBLE >> clear but the VM bit is still set. > > I mean to say clear both as we are doing currently in code: > if (PageIsAllVisible(BufferGetPage(buffer))) > { > all_visible_cleared = true; > PageClearAllVisible(BufferGetPage(buffer)); > visibilitymap_clear(relation, BufferGetBlockNumber(buffer), > vmbuffer); > } Sure, but without emitting a WAL record, that's just broken. You could have the heap page get flushed to disk and the VM page not get flushed to disk, and then crash, and now you have the classic VM corruption scenario. >> And you still haven't WAL-logged >> anything. > > Yeah, I think WAL requirement is more difficult to meet and I think > releasing the lock on buffer before writing WAL could lead to flush of such > a buffer before WAL. > > I feel this is an existing-bug and should go to Older Bugs Section in open > items page. It does seem to be an existing bug, but the freeze map makes the problem more serious, I think. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: