Re: [NOVICE] Applicationl Crash - Connection reset by peer !!! - Mailing list pgsql-admin

From Tom Lane
Subject Re: [NOVICE] Applicationl Crash - Connection reset by peer !!!
Date
Msg-id 6303.1094048825@sss.pgh.pa.us
Whole thread Raw
In response to Applicationl Crash - Connection reset by peer !!!  ("Pradeepkumar, Pyatalo (IE10)" <Pradeepkumar.Pyatalo@honeywell.com>)
List pgsql-admin
"Pradeepkumar, Pyatalo (IE10)" <Pradeepkumar.Pyatalo@honeywell.com> writes:
> I am using Postgresql 7.4.3 running on RedHat Linux 2.4.7. My Application is
> coded in C. I am using libpq functions inorder to connect to the database.
> I am using PQsetdbLogin() to connect and PQfinish() to release the database
> connection. In my application I have around 15-20 C functions. In each
> function i connect to the database, perform some query and then release the
> connection. Today the application is crashing. It says SEGMENTATION FAULT in
> PQsetdbLogin().

The odds are *extremely* high that this is a bug in your own code, not
in libpq.  PQsetdbLogin() is probably just the victim of a memory stomp
occurring elsewhere.

            regards, tom lane

pgsql-admin by date:

Previous
From: Lawrence C
Date:
Subject: Create Linux Script for PostgreSQL database backup
Next
From: "Michael Paesold"
Date:
Subject: Re: slower every day