The Tcl_Channel type mismatch was wrong alarm, ths is detected
automatically (but should be corrected in future versions anyhow).
The SEGV is, when Tcl_DontCallWhenDeleted is called, when the channel
is shut down (PgDelConnectionId). Unfortunately notifies->interp is
NULL and Tcl_DontCallWhenDeleted does not like that at all.
This might be the reason, why the patch from ljb (sorry, no name)
helps.
I will track down that deeper tomorrow when I'm at home, posting via
Google takes too long.
Gerhard