Re: limiting connections per user/database

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: limiting connections per user/database
Дата
Msg-id 27883.1119850920@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: limiting connections per user/database  (Neil Conway <neilc@samurai.com>)
Ответы Re: limiting connections per user/database  (Neil Conway <neilc@samurai.com>)
Список pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> Tom Lane wrote:
>> I looked at this but did not actually see the code path that requires
>> forcing creation of the per-DB entry right at this spot.  The HASH_FIND
>> calls for this hashtable seem to all happen on the backend side not the
>> collector side.  Can you explain why we need this?

> Yeah, I missed this when making the original change (this code is rather
> opaque :-\).

No kidding.  Somebody ought to separate the collector-side code from the
backend-side code sometime.

> BTW, the comment at line 2210 of pgstat.c is misleading: the n_backends
> in the entries of the dbentry hash table are explicitly ignored when
> reading in the stats file -- the value is instead derived from the
> number of beentries that are seen.

Right.  So do we care whether the collector has the right number?
Or should we push the responsibility for tracking that count over
to the collector (+1 for that personally)?

            regards, tom lane

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

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: limiting connections per user/database
Следующее
От: Neil Conway
Дата:
Сообщение: Re: limiting connections per user/database