pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feeddetermining which operation is blocking another query
2+ messages / 2 participants
[nested] [flat]
* determining which operation is blocking another query
@ 2006-05-25 06:49 Sriram Dandapani <sdandapani@counterpane.com>
0 siblings, 1 reply; 2+ messages in thread
From: Sriram Dandapani @ 2006-05-25 06:49 UTC (permalink / raw)
To: pgsql-admin
Hi
Is there a system view that can be used to determine which
INSERT/UPDATE/DELETE/Other Operation is blocking a SELECT statement.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: determining which operation is blocking another query
@ 2006-05-25 07:27 Michael Fuhr <mike@fuhr.org>
parent: Sriram Dandapani <sdandapani@counterpane.com>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Fuhr @ 2006-05-25 07:27 UTC (permalink / raw)
To: Sriram Dandapani <sdandapani@counterpane.com>; +Cc: pgsql-admin
On Wed, May 24, 2006 at 11:49:37PM -0700, Sriram Dandapani wrote:
> Is there a system view that can be used to determine which
> INSERT/UPDATE/DELETE/Other Operation is blocking a SELECT statement.
Query pg_locks to see what locks transactions have acquired or are
waiting to acquire. If you have stats_command_string enabled then
querying pg_stat_activity should show sessions' current queries.
Are you sure SELECT is blocked, or could it just be taking a long
time? MVCC allows SELECT to run concurrently with INSERT, UPDATE,
and DELETE without blocking; only a few operations like VACUUM FULL
block an ordinary SELECT (without FOR SHARE or FOR UPDATE).
--
Michael Fuhr
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-05-25 07:27 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-05-25 06:49 determining which operation is blocking another query Sriram Dandapani <sdandapani@counterpane.com>
2006-05-25 07:27 ` Michael Fuhr <mike@fuhr.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox