Casting shared leads to GC deadlocks. Avoid casting for stdlog.d.
Avoiding casting shared in CPGresult. Suprise! It suddenly fixes dead
lock.
Avoiding casting shared in CPGconn.
Avoiding casting shared in PQConnection.