Re: Reviewing freeze map code
От | Andres Freund |
---|---|
Тема | Re: Reviewing freeze map code |
Дата | |
Msg-id | 20160718034352.ddzljwmmsicprknj@alap3.anarazel.de обсуждение исходный текст |
Ответ на | Re: Reviewing freeze map code (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: Reviewing freeze map code
|
Список | pgsql-hackers |
On 2016-07-18 09:07:19 +0530, Amit Kapila wrote: > + /* > + * Before locking the buffer, pin the visibility map page if it may be > + * necessary. > + */ > > + if (PageIsAllVisible(BufferGetPage(*buffer))) > + visibilitymap_pin(relation, block, &vmbuffer); > + > LockBuffer(*buffer, BUFFER_LOCK_EXCLUSIVE); > > I think we need to check for PageIsAllVisible and try to pin the > visibility map after taking the lock on buffer. I think it is quite > possible that in the time this routine tries to acquire lock on > buffer, the page becomes all visible. I don't see how. Without a cleanup lock it's not possible to mark a page all-visible/frozen. We might miss the bit becoming unset concurrently, but that's ok. Andres
В списке pgsql-hackers по дате отправления: