pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Robert Haas <robertmhaas@gmail.com>
To: Brian Cox <brian.cox@ca.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: "slow" queries
Date: Sat, 28 Feb 2009 22:15:17 -0500
Message-ID: <603c8f070902281915u4d402589wef143ff433a8a3d2@mail.gmail.com> (raw)
In-Reply-To: <49A9F834.8060100@ca.com>
References: <49A9F834.8060100@ca.com>

On Sat, Feb 28, 2009 at 9:51 PM, Brian Cox <brian.cox@ca.com> wrote:
> Actually, they're all deadlocked. The question is why?
>
> Here's a brief background. The ts_defects table is partitioned by occurrence
> date; each partition contains the rows for 1 day. When the data gets old
> enough, the partition is dropped. Since the correct partition can be
> determined from the occurrence date, there is no trigger: inserts are done
> directly into the correct partition. Multiple threads may be inserting into
> a partition at the same time. The thread that checks for old data to be
> dropped runs at 00:30 each night. It also creates the partition for the next
> day.
>
> Below is the output from:
> select xact_start,query_start,substring(current_query from 0 for 40) from
> pg_stat_activity order by xact_start;

Can you post this again with procpid added to the column list and
without truncating current_query?  And then also post the results of
"select * from pg_locks"?

Is there anything interesting in the postmaster log?

...Robert



view thread (14+ messages)  latest in thread

Message-ID: <603c8f070902281915u4d402589wef143ff433a8a3d2@mail.gmail.com>
Permalink:  ../603c8f070902281915u4d402589wef143ff433a8a3d2@mail.gmail.com/
Also on:    postgresql.org/message-id/603c8f070902281915u4d402589wef143ff433a8a3d2@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: robertmhaas@gmail.com, brian.cox@ca.com
  Subject: Re: "slow" queries
  In-Reply-To: <603c8f070902281915u4d402589wef143ff433a8a3d2@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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