Re: Why are these ARC variables per-backend?

Поиск
Список
Период
Сортировка
От Kenneth Marshall
Тема Re: Why are these ARC variables per-backend?
Дата
Msg-id 20040419194745.GB22001@it.is.rice.edu
обсуждение исходный текст
Ответ на Re: Why are these ARC variables per-backend?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Apr 19, 2004 at 02:58:11PM -0400, Tom Lane wrote:
> Jan Wieck <JanWieck@Yahoo.com> writes:
> > Tom Lane wrote:
> >> I've got a problem with these variables in freelist.c:
> >> 
> >> static int        strategy_cdb_found;
> >> static int        strategy_cdb_replace;
> 
> > These two most definitely are per backend because they hold status 
> > information about the blocks this backend specifically is mucking with. 
> > If it all would be in one function, they would be local variables.
> 
> Would you object if I made 'em actual local variables?  This would
> clutter the strategy API slightly since the vars would have to be passed
> out of some routines and into others, but I think it would be logically
> cleaner.  (In the back of my mind is the idea to support two instances
> of the ARC datastructure, one for global and one for local buffers, so
> minimizing the number of static variables is a prerequisite.)

I am not sure what changes are in store with the bufmgr locking, but
the concurrency could also benefit from having multiple buffer queues.
This would allow the contention for the locks to be further reduced.
The change to a local variable would also enable that change.

Ken Marshall



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

Предыдущее
От: "Robert Turnbull"
Дата:
Сообщение: Re: Prepared select
Следующее
От: Ken Ashcraft
Дата:
Сообщение: Probably security hole in postgresql-7.4.1