From: | 高增琦 <pgf00a(at)gmail(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Simon Riggs <simon(at)2ndquadrant(dot)com>, Jesper Krogh <jesper(at)krogh(dot)cc>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: crash-safe visibility map, take four |
Date: | 2011-03-31 08:46:10 |
Message-ID: | AANLkTikBWi-a2eNPBK=VfLDQdOunq7hsFeVwLZpimJ8W@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2011/3/30 Robert Haas <robertmhaas(at)gmail(dot)com>
> Maybe we could check PD_ALL_VISIBLE before
> taking the buffer lock - if it appears to be set, then we pin the
> visibility map page before taking the buffer lock. Otherwise, we take
> the buffer lock at once. Either way, once we have the lock, we
> recheck the bit. Only if it's set and we haven't got a pin do we need
> to do the drop-lock-pin-reacquire-lock dance. Is that at all
> sensible?
>
But only lock can make sure the page has enough free space.
If we try the drop-lock-...-lock dance, we may fall into a dead loop.
--
GaoZengqi
pgf00a(at)gmail(dot)com
zengqigao(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Urbański | 2011-03-31 09:30:29 | Re: Re: [COMMITTERS] pgsql: Fix plpgsql to release SPI plans when a function or DO block is |
Previous Message | 高增琦 | 2011-03-31 08:33:36 | Re: crash-safe visibility map, take four |