SUPNXP-8439: Backport single-datasource mode to 5.4.2