Re: shared memory message queues

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: shared memory message queues
Дата
Msg-id 20131221094559.GE15323@alap2.anarazel.de
обсуждение исходный текст
Ответ на Re: shared memory message queues  (Andres Freund <andres@2ndquadrant.com>)
Список pgsql-hackers
On 2013-12-20 22:04:05 +0100, Andres Freund wrote:
> Hi,
> 
> On 2013-12-18 15:23:23 -0500, Robert Haas wrote:
> > It sounds like most people who have looked at this stuff are broadly
> > happy with it, so I'd like to push on toward commit soon, but it'd be
> > helpful, Andres, if you could review the comment additions to
> > shm-mq-v2.patch and see whether those address your concerns.  If so,
> > I'll see about improving the overall comments for shm-toc-v1.patch as
> > well to clarify the points that seem to have caused a bit of
> > confusion; specific thoughts on what ought to be covered there, or any
> > other review, is most welcome.
> 
> Some things:

One more thing:
static uint64
shm_mq_get_bytes_written(volatile shm_mq *mq, bool *detached)
{       uint64  v;
       SpinLockAcquire(&mq->mq_mutex);       v = mq->mq_bytes_written;       *detached = mq->mq_detached;
SpinLockRelease(&mq->mq_mutex);
       return mq->mq_bytes_written;
}

Note how you're returning mq->mq_bytes_written instead of v.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: ISN extension bug?
Следующее
От: David Rowley
Дата:
Сообщение: Re: [PATCH] Negative Transition Aggregate Functions (WIP)