postgres and cap debugging