Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Re: How does the partitioned lock manager works?


  • From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
  • To: rancpine cui <rancpine(at)gmail(dot)com>
  • Cc: pgsql-hackers(at)postgresql(dot)org
  • Subject: Re: How does the partitioned lock manager works?
  • Date: Fri, 27 Apr 2007 10:01:58 +0100
  • Message-id: <4631BC06.5000304@enterprisedb.com> <text/plain>

rancpine cui wrote:
   When the lock manager's data structures were split into "partitions",
how many such data structures can one partition control?

The number of partitions is 16 (NUM_LOCK_PARTITIONS). The total size of the lock hash table is max_locks_per_xact * (max_connections + max_prepared_xacts). So the number of "lock slots" per partition is (max_locks_per_xact * (max_connections + max_prepared_xacts))/NUM_LOCK_PARTITIONS.

Since we use
LOCKTAG's hash value to decide the partition which the lock should in, can
all locks be split into ONE partition?

In theory, yes. It's extremely unlikely to happen in practice.

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group