Re: query against pg_locks leads to large memory alloc

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Dave Owens <dave(at)teamunify(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Matheus de Oliveira <matioli(dot)matheus(at)gmail(dot)com>, postgres performance list <pgsql-performance(at)postgresql(dot)org>
Subject: Re: query against pg_locks leads to large memory alloc
Date: 2014-08-19 18:43:30
Message-ID: 1408473810.64930.YahooMailNeo@web122304.mail.ne1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Dave Owens <dave(at)teamunify(dot)com> wrote:
> On Tue, Aug 19, 2014 at 11:01 AM, Kevin Grittner <kgrittn(at)ymail(dot)com> wrote:

>> CREATE TABLE activity_snap_1 AS SELECT * FROM pg_stat_activity;

> Would the you or the list be interested in snapshots of pg_locks as well?

Most definitely!  I'm sorry that copied/pasted the pg_stat_activity
example, I was playing with both.  pg_locks is definitely the more
important one, but it might be useful to try to match some of these
locks up against process information as we drill down from the
summary to see examples of what makes up those numbers.

> I can take a restart tonight and get this going on a half-hourly basis
> (unless you think more frequent snaps would be useful).

Each half-hour should be fine as long as that gives at least three
or four samples before you are unable to query pg_locks.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Huang, Suya 2014-08-20 09:30:27 query on parent partition table has bad performance
Previous Message Dave Owens 2014-08-19 18:28:58 Re: query against pg_locks leads to large memory alloc