Skip site navigation (1) Skip section navigation (2)

Re: Re: libpq++

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: justinb(at)mr-boo(dot)com, justinb(at)tricord(dot)com, PostgreSQL-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Re: libpq++
Date: 2001-05-03 19:15:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
> Justin Banks <justinb(at)mr-boo(dot)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                        |
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to


pgsql-interfaces by date

Next:From: Tom LaneDate: 2001-05-03 19:25:36
Subject: Re: Re: libpq++
Previous:From: Tom LaneDate: 2001-05-03 19:13:00
Subject: Re: Re: libpq++

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group