but don't break Pg cursors in the process, #28895