Re: COPY locking

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: COPY locking
Дата
Msg-id 24629.989527554@sss.pgh.pa.us
обсуждение исходный текст
Ответ на RE: COPY locking  ("Mikheev, Vadim" <vmikheev@SECTORBASE.COM>)
Список pgsql-general
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM> writes:
> access/heap/hio.c:RelationGetBufferForRelation() uses LockPage
> (ie lmgr -> semops) to syncronize table extending.

But no semop should occur unless somebody is actually blocking on
the lock.  John's trace only showed one active backend, so I figured
that there shouldn't be any blockage.

> Probably we could
> optimize this somehow, but allocation of new page in bufmgr is
> horrible and that's why we have locks in hio.c from the beginning.

See later message about eliminating lseeks --- I think we should be
able to avoid doing this lock for every single tuple, as it does now,
and only do it when we need to allocate a new page.

            regards, tom lane

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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: NAMEDATALEN
Следующее
От: Zak McGregor
Дата:
Сообщение: Re: formatting a date