Re: Problems with PG 9.3 - Mailing list pgsql-admin

From Dhruv Shukla
Subject Re: Problems with PG 9.3
Date
Msg-id CAFiWeJBppWiDKBgN49WpFgGrRYw3tG9W=gsjNkZTNwmEafX1=g@mail.gmail.com
Whole thread Raw
In response to Re: Problems with PG 9.3  (Albe Laurenz <laurenz.albe@wien.gv.at>)
Responses Re: Problems with PG 9.3  (Dhruv Shukla <dhruvshukla82@gmail.com>)
List pgsql-admin
We have a script which notifies us if there are any locks that its waiting for and it sends an email out. But nothing has came thru ...
here is one pid which has got stuck from midnight and is still running, but doesnt seem like it will finish anytime soon. It was run manually by me using an strace.

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
64144 postgres  20   0 81.2g 4.1g 4.1g R 100.0  1.1 537:59.86 postmaster

I even checked the lock scripts by running each of the query but nothing has came thru.
https://wiki.postgresql.org/wiki/Lock_Monitoring

Cent OS 6.3, Postgres 9.3.3, Postgis.


On Mon, Aug 25, 2014 at 1:54 AM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
Dhruv Shukla wrote:
> Right now we are doing is only logs where on each statement for a sql function we are raising an info.
>
> This way we know which step its getting stuck. Today it got stuck on the insert statement.
>
> And we ran the same SQL function after killing the process, it ran normal without any issues.

That sounds a lot like locking problems.

Examine pg_locks when a process gets stuck an see if it is waiting for a lock
and who is holding the lock.

Yours,
Laurenz Albe



--
Regards
Dhruv
404-551-2578

pgsql-admin by date:

Previous
From: Horst Düster
Date:
Subject: Re: Database User Quota
Next
From: Dhruv Shukla
Date:
Subject: Re: Problems with PG 9.3