Обсуждение: Re: Need some info on Postgresql

Поиск
Список
Период
Сортировка

Re: Need some info on Postgresql

От
"Suresh Gupta VG"
Дата:

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.

 

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).

Pls advice and suggest us what to do.

 

Regards,

G. V. Suresh Gupta

---------------------------------------------------------------------------------------------------------------------------------

Innovative Technology Solutions(ITS), Zensar Technologies

Zensar Knowledge Park, Plot#5, MIDC IT Tower,

Kharadi, Off Nagar Road, Pune – 411014

Landline :  +91-20-66453471           | +91-9890898688                

Email     :   suresh.g@zensar.com    | website:  www.zensar.com

 

 

 

 

 

-----Original Message-----
From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
Sent: Monday, January 07, 2008 10:17 PM
To: Suresh Gupta VG
Cc: Peter Koczan; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] Need some info on Postgresql

 

On Jan 7, 2008 3:41 AM, Suresh Gupta VG <suresh.g@zensar.com> wrote:

> Hi Scott,

> Thanks for your reply. Pls find the attached file for the output of the

> command given by you. The reindex problem is coming for the table

> "currency". Pls look into the result and advice me what to do.

 

Well, looks like something is holding locks on currency.  What

processes are using that table and what kind of explicit locks, if

any, are they taking?

DISCLAIMER:
This email may contain confidential or privileged information for the intended recipient(s) and the views expressed in the same are not necessarily the views of Zensar Technologies Ltd. If you are not the intended recipient or have received this e-mail by error, its use is strictly prohibited, please delete the e-mail and notify the sender. Zensar Technologies Ltd. does not accept any liability for virus infected mails.

Вложения

Re: Need some info on Postgresql

От
"Scott Marlowe"
Дата:
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.