Re: Postgres connection status as BIND - Mailing list pgsql-performance

From Tom Lane
Subject Re: Postgres connection status as BIND
Date
Msg-id 14896.1245075443@sss.pgh.pa.us
Whole thread Raw
In response to Postgres connection status as BIND  (Nimesh Satam <nimesh.zedo@gmail.com>)
List pgsql-performance
Nimesh Satam <nimesh.zedo@gmail.com> writes:
> When we do a ps U postgres command, we find some connection in BIND status:

> 10088 ?        Ss     0:00 postgres: chk production xxx.xx.x.xx(48672) BIND
> 10090 ?        Ss     0:00 postgres: chk production xxx.xx.x.xx(48674) BIND

> Can anybody tell what exactly the above connection status means,

It's trying to do the Bind Parameters step of the prepared-query
protocol.  AFAICS, a hang here means either a problem in parameter
value conversion (have you got any custom datatypes with input functions
that maybe aren't debugged very well?) or something odd happening while
trying to plan or re-plan the query.  Have you identified just which
queries hang up this way?  (pg_stat_activity might help here.)

One fairly likely theory is that these are blocked trying to acquire
locks on tables their queries will reference.  Have you looked into
pg_locks for evidence of someone sitting on exclusive locks?

            regards, tom lane

pgsql-performance by date:

Previous
From: Nimesh Satam
Date:
Subject: Postgres connection status as BIND
Next
From: Alan Hodgson
Date:
Subject: Re: Postgres connection status as BIND