libpq++ in Apache Problem. - Mailing list pgsql-interfaces

From
Subject libpq++ in Apache Problem.
Date
Msg-id Pine.LNX.4.30.0105271914200.14985-100000@commandprompt.com
Whole thread Raw
List pgsql-interfaces
Good day,

I'm experiencing a truly strange issue with the libpq++ interface when I
run it within an Apache process, and I was hoping that perhaps someone
else has run into this.

Inside of an Apache module I am developing, I need to make calls to
PostgreSQL, so I am building it with the libpq++ interface. It's worked
fine thus far, because the module is designed to keep a persistent
connection to PostgreSQL by having a PgDatabase* object that lives and
dies with each httpd process.

However, if I try to instantiate a PgDatabase* connection temporarily
within the httpd process, even though I delete the pointer to call the
destructor of the Object, the postmaster connection *continues to hang
around*, well after the request has finished processing, and well after
the call to its destructor is made.

I thought this might have something to do with the kind of convoluted way
that I'm linking my Apache module (which is written in C++, while Apache
is compiled in C) so I wrote a test case of a simple console application
that is written in C, but calls to object code compiled in C++ with
libpq++, and it behaved correctly. I was able to call destructors fine,
and memory was instantly returned and the connection closed.

So... I'm really at a loss here on what's going on, and wondering if
anyone has some insight? I can give more technical details if necessary,
that's just the gist of the problem.


Thanks, and Regards,
Jw.
--
John Worsley - Command Prompt, Inc.
jlx@commandprompt.com By way of pgsql-interfaces@commandprompt.com




pgsql-interfaces by date:

Previous
From: radius
Date:
Subject: access + odbc = readonly!?!?!?
Next
From: "Joe Conway"
Date:
Subject: remote database queries