Re: query against pg_locks leads to large memory alloc - Mailing list pgsql-performance

From Dave Owens
Subject Re: query against pg_locks leads to large memory alloc
Date
Msg-id CA+OQrzg0OwnU4TyMnwi577M7aCrNjBb0ObJoyZW+ndUWjmOEgg@mail.gmail.com
Whole thread Raw
In response to Re: query against pg_locks leads to large memory alloc  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: query against pg_locks leads to large memory alloc
List pgsql-performance
I now have 8 hours worth of snapshots from pg_stat_activity and
pg_locks (16 snapshots from each table/view).  I have turned off
collection at this point, but I am still able to query pg_locks:

# SELECT mode, count(mode) AS count FROM pg_locks GROUP BY mode ORDER BY mode;
       mode       |  count
------------------+---------
 AccessShareLock  |     291
 ExclusiveLock    |      19
 RowExclusiveLock |       4
 RowShareLock     |       1
 SIReadLock       | 7287531
(5 rows)

SIReadLocks continue to grow.  It seems, in general, that our
application code over uses Serializable... we have produced a patch
that demotes some heavy-hitting queries down to Read Committed, and we
will see if this makes an impact on the number of SIReadLocks.

Is it interesting that only 101557 out of 7 million SIReadLocks have a
pid associated with them?

-Dave Owens


pgsql-performance by date:

Previous
From: Tom Lane
Date:
Subject: Re: query on parent partition table has bad performance
Next
From: Kevin Grittner
Date:
Subject: Re: query against pg_locks leads to large memory alloc