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.
regards, tom lane