pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pgsql-interfaces@commandprompt.com
To: pgsql-interfaces@postgresql.org
Subject: libpq++ in Apache Problem.
Date: Sun, 27 May 2001 19:22:03 -0700 (PDT)
Message-ID: <Pine.LNX.4.30.0105271914200.14985-100000@commandprompt.com> (raw)

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





view thread (5+ messages)  latest in thread

Message-ID: <Pine.LNX.4.30.0105271914200.14985-100000@commandprompt.com>
Permalink:  ../Pine.LNX.4.30.0105271914200.14985-100000@commandprompt.com/
Also on:    postgresql.org/message-id/Pine.LNX.4.30.0105271914200.14985-100000@commandprompt.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: pgsql-interfaces@commandprompt.com
  Subject: Re: libpq++ in Apache Problem.
  In-Reply-To: <Pine.LNX.4.30.0105271914200.14985-100000@commandprompt.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox