Alternative TIP #440 implementation, based on TIP #59