The userid being printed is from UserMapping. The new API GetUserMappingById() allows an FDW to get user mapping by its OID. This API is intended to be used by FDWs to fetch the user mapping inferred by the core for given join between foreign relations. In such user mapping object , userid may be -1 for a public user mapping. I think using %u for -1 will print it as largest integer. Would that create confusion for users?