On Wed, Jan 29, 2014 at 3:09 PM, Neil Harkins <nharkins@xxxxxxxxx> wrote:
Note the number of exclusive locks in my first message, it is equal to the number of threads (20). Also, the ALTER was not running then, apologies if that was not clear.
Not all locks are on tables. Each transaction holds an Exclusive lock on its own virtual transaction id, and that is what you are seeing there. Looking the pg_locks table without looking at the nature of the locks is generally not very useful.
Cheers,
Jeff