pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: justinb@mr-boo.com, justinb@tricord.com, PostgreSQL-interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: Re: libpq++
Date: Thu, 3 May 2001 15:15:51 -0400 (EDT)
Message-ID: <200105031915.f43JFpf12056@candle.pha.pa.us> (raw)
In-Reply-To: <29887.988917180@sss.pgh.pa.us>

> Justin Banks <justinb@mr-boo.com> writes:
> > As one would have expected, I've found a problem. The c++ std. says that
> > Automatic objects are not destroyed as a result of calling exit(), and so, a
> > automatic PgDatabase in main() (or most anywhere, actually), would not have
> > it's destructor called during an exit(), thereby leaving junk shm. segments
> > around.
> 
> Unless your kernel is broken, application exit will cause the backend
> connection to be closed, whereupon the backend will exit gracefully.
> I see nothing to worry about here.
> 
> I'm not sure where you got this notion that clients get to touch any
> of Postgres' shared memory ;-) but they don't.

I think he is creating his own shared memory area:

---------------------------------------------------------------------------

What I'd like to have happen is for a total of one connection to the
database to be made, and have all these objects share that connection
transparently. I made this happen by using a shared memory segment to
store the connection pointer. Here's the diff. It doesn't seem to break
anything, but then again, my coverage is rather limited at this point.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



view thread (36+ messages)  latest in thread

Message-ID: <200105031915.f43JFpf12056@candle.pha.pa.us>
Permalink:  ../200105031915.f43JFpf12056@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200105031915.f43JFpf12056@candle.pha.pa.us

 · 

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: pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us
  Subject: Re: Re: libpq++
  In-Reply-To: <200105031915.f43JFpf12056@candle.pha.pa.us>

* 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