postgres: workaround for bug #12837