Re: Need some info on Postgresql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 8, 2008 1:39 AM, Suresh Gupta VG <suresh.g@xxxxxxxxxx> 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.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux