pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <scott.marlowe@gmail.com>
To: Suresh Gupta VG <suresh.g@zensar.com>
Cc: Peter Koczan <pjkoczan@gmail.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Need some info on Postgresql
Date: Tue, 8 Jan 2008 09:25:07 -0600
Message-ID: <dcc563d10801080725o6edf5f46r67173239fe1d8d02@mail.gmail.com> (raw)
In-Reply-To: <3D5445983859B84B92669C0D883EA6FB0BB94E30@ZENMAILHQ1.ind.zensar.com>
References: <3D5445983859B84B92669C0D883EA6FB0BB94E30@ZENMAILHQ1.ind.zensar.com>

On Jan 8, 2008 1:39 AM, Suresh Gupta VG <suresh.g@zensar.com> wrote:
>
> Thanks Scott for your reply.
>
> Actually, our application will extract all the data from currency table and
> never uses that table later at all. I don't know which process is locking
> that table. Pls find the attached file for the list of locks available on
> our Pgsql. Our database is restarted recently last 2 days back. No fruitful
> result has come.

Then whatever is causing your problems is happening right after you
turn it back on.

> Pls advice us why it is happening. And our database is taking more than 5
> minutes to execute a simple query directly on the database at the peak
> timings say (9:00 Am to 11:00 AM).

It's your database it's happening in, so the why is hidden away in
there.  All I can do is help you find it, as I'm not looking at it
myself...  :)

> Pls advice and suggest us what to do.

Try this query:

select pgc.relname, pgl2.relation, pgl.mode  from pg_locks pgl join
pg_locks pgl2
on (pgl.relation is null AND pgl2.relation is not null and
pgl.pid=pgl2.pid) join pg_class pgc on (pgl2.relation=pgc.oid);

and look for modes that are ExclusiveLock and the like.  Shared stuff isn't bad.

So, I'm guessing that something you're doing with your database is
taking out these locks.  DDL in a long running transaction, that kind
of thing.



view thread (9+ messages)

Message-ID: <dcc563d10801080725o6edf5f46r67173239fe1d8d02@mail.gmail.com>
Permalink:  ../dcc563d10801080725o6edf5f46r67173239fe1d8d02@mail.gmail.com/
Also on:    postgresql.org/message-id/dcc563d10801080725o6edf5f46r67173239fe1d8d02@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-admin@postgresql.org
  Cc: scott.marlowe@gmail.com, suresh.g@zensar.com, pjkoczan@gmail.com
  Subject: Re: Need some info on Postgresql
  In-Reply-To: <dcc563d10801080725o6edf5f46r67173239fe1d8d02@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