Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock)

Поиск
Список
Период
Сортировка
От Fujii Masao
Тема Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock)
Дата
Msg-id CAHGQGwG-yz3QYxw4jrVLFu4bMqbLQPREZi7nqg3VTkMCYJ=THg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Scaling XLog insertion (was Re: Moving more work outside WALInsertLock)
Список pgsql-hackers
On Tue, Mar 6, 2012 at 2:17 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
>> On 21.02.2012 13:19, Fujii Masao wrote:
>>> In some places, the spinlock "insertpos_lck" is taken while another
>>> spinlock "info_lck" is being held. Is this OK? What if unfortunately
>>> inner spinlock takes long to be taken?
>
>> Hmm, that's only done at a checkpoint (and a restartpoint), so I doubt
>> that's a big issue in practice. We had the same pattern before the
>> patch, just with WALInsertLock instead of insertpos_lck. Holding a
>> spinlock longer is much worse than holding a lwlock longer, but
>> nevertheless I don't think that's a problem.
>
> No, that's NOT okay.  A spinlock is only supposed to be held across a
> short straight-line sequence of instructions.

This also strikes me that the usage of the spinlock insertpos_lck might
not be OK in ReserveXLogInsertLocation() because a few dozen instructions
can be performed while holding the spinlock....

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Shigeru Hanada
Дата:
Сообщение: Re: pgsql_fdw, FDW for PostgreSQL server
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: review: CHECK FUNCTION statement