Thread: backend closing connections while executing...

backend closing connections while executing...

From
Anand Raman
Date:
hi guys

While executing a simple query my the psql session reports that the
session has closed abnormally..

Can any one point out why .. The sample sql query is as follows..

arttoday=# select
arttoday-#     art1.name,
arttoday-#     CASE WHEN exh.title IS NULL THEN 'Untitled' ELSE exh.title END,
arttoday-#     ltrim(to_char(exh_dist.length,'9999D99')) ||
arttoday-#         CASE WHEN exh_dist.breadth IS NOT NULL
arttoday-#             THEN ' x '||ltrim(to_char(exh_dist.breadth,'9999D00'))||' cms.'
arttoday-#             ELSE ' cms '||exh_dist.dimensional_aspect END
arttoday-# from
arttoday-#     exhibit_distributions exh_dist,
arttoday-#     exhibits exh,
arttoday-#     artists art1
arttoday-# where
arttoday-#     exh_dist.gallery_id = 21
arttoday-# and exh_dist.exhibit_id = exh.exhibit_id
arttoday-# and exh.artist_id2 IS NULL
arttoday-# and exh.artist_id1 = art1.artist_id;
pqReadData() -- backend closed the channel unexpectedly.
This probably means the backend terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset:
Succeeded.

I am running postgresql 702 on Redhat..

I use the following command line parameters to start the db
pg_ctl -o '-i -B 100 -N 50 -o "-C -F -S4096"' start 1>postmaster.log 2>&1

The tables are fairly small with 600 odd rows ..

Also when i do a query as simple as
arttoday=# select ltrim(to_char(exh_dist.length,'9999D99')) from exhibit_distributions exh_dist
the backend closes abnormally..

Can any help me out of this ..

Thanks
Anand

Re: backend closing connections while executing...

From
Karel Zak
Date:
On Thu, 25 Jan 2001, Anand Raman wrote:

> hi guys
>
> While executing a simple query my the psql session reports that the
> session has closed abnormally..
>
> Can any one point out why .. The sample sql query is as follows..
>
> Also when i do a query as simple as
> arttoday=# select ltrim(to_char(exh_dist.length,'9999D99')) from exhibit_distributions exh_dist
> the backend closes abnormally..
>

 It can be a to_char() problem. Can you send "crash" query directly with
data? What go into function to_char()? (select exh_dist.length from
exh_dist).

 PG version? Are you use locales?

        Karel