Re: Hot Standby 0.2.1
От | Heikki Linnakangas |
---|---|
Тема | Re: Hot Standby 0.2.1 |
Дата | |
Msg-id | 4ABC981D.6050700@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: Hot Standby 0.2.1 (Simon Riggs <simon@2ndQuadrant.com>) |
Ответы |
Re: Hot Standby 0.2.1
|
Список | pgsql-hackers |
Simon Riggs wrote: > On Wed, 2009-09-23 at 19:07 +0300, Heikki Linnakangas wrote: > >> Rather than keep the numHeldLocks counters per-proc in proc array, I >> think it would be simpler to have a single (or one per lock partition) >> counter in shared memory in lock.c. It's just an optimization to make it >> faster to find out that there is no loggable AccessExclusiveLocks in the >> system, so it really rather belongs into the lock manager. > > What lock would protect that value? The whole purpose is to avoid taking > the LockMgrLocks and to give something that is accessible by the locks > already held by GetRunningTransactionData(). The lock partition lock (so we really need one counter per partition, a single counter would need additional locking). We're already holding that in LockAcquire/LockRelease when we need to increment/decrement the counter. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: