Forum OpenACS Development: Re: Problem with db_transaction?

Collapse
Posted by Don Baccus on
Ahem.

"I certainly wouldn't be sending any (OS) signals to the db server when shutting down AOLServer."

OK

"However I would expect the database driver to terminate it's connections to the dbms, which I would in turn expect to cause the running queries to terminate (like pressing Ctrl-C in a psql terminal)."

Sending an OS signal (SIGTERM) to the backend process is HOW psql terminates a query when you press Ctrl-C ...

And you're misreading the doc you cite, the backend isn't actively checking for a termination message, a new backend process is sent a termination message and it in turn bops the query-running process with a SIGTERM signal. Signals are CAUGHT, not POLLED ... all the doc sez is that the backend, while running a query, doesn't POLL to see if a terminate message has been sent but rather responds to a signal (which takes no overhead since the OS takes care of calling the catching function directly when it processes the signal).