I'm using the DBD::Pg driver for a system which will fork() and run in the
background. The perldoc for DBI indicates that fork() messes up database
handles, so one should set the "InactiveDestroy" attribute for database
handles before forking.
My problem is that even doing this, my system hangs or coredumps after the
fork() call, on the first attempt to query the database.
There's some confusion on my part as to whether one should set the
attribute to "1" or "0"; I've tried both without noticible difference. The
only thing that's worked so far is to reconnect each handle after the
fork, in the child process (the main process exits after forking, which is
closing the handles).
Part of the difficulty here is that the handles are buried deep inside
database layer abstraction objects, so it irks me that I have to call
something in my database-connection package to fiddle with each handle.
--
Jeff Boes vox 616.226.9550
Database Engineer fax 616.349.9076
Nexcerpt, Inc. [EMAIL PROTECTED]