Package: postgresql-common Version: 294 On a fresh install of postgresql-common 294, /var/log/postgresql stays root:root 0755 instead of postgres:postgres 2775, as given in /usr/lib/tmpfiles.d/postgresql-common.conf. /var/lib/postgresql also stays root:root, and /run/postgresql is not created.
The cause is the order of the autogenerated snippets in postinst: the dh_installtmpfiles snippet runs "systemd-tmpfiles --create postgresql-common.conf" before the dh_installsysusers snippet creates the postgres user. systemd-tmpfiles cannot resolve the user, and the "|| true" hides the failure: Setting up postgresql-common (294.pgdg26.04+2) ... /usr/lib/tmpfiles.d/postgresql-common.conf:2: Failed to resolve user 'postgres': Unknown user /usr/lib/tmpfiles.d/postgresql-common.conf:4: Failed to resolve user 'postgres': Unknown user /usr/lib/tmpfiles.d/postgresql-common.conf:6: Failed to resolve user 'postgres': Unknown user /usr/lib/tmpfiles.d/postgresql-common.conf:8: Failed to resolve user 'postgres': Unknown user Creating group 'postgres' with GID 993. Creating user 'postgres' (PostgreSQL administrator) with UID 993 and GID 993. This started this afternoon in our builds for Debian 12 and 13 and Ubuntu, see https://github.com/zulip/zulip/actions/runs/43338169534/job/131602011389#step:6:2678 for a failed build.

