The current base image installs the PostgreSQL 18 server, but postgres.15.template.yml still assumes that the PostgreSQL 15 server packages are already present. It therefore reaches:
/etc/postgresql/15/main/postgresql.conf
before that file exists, producing the ENOENT error above.
I’ve opened a small PR which makes the PostgreSQL 15 holdback template remove the PostgreSQL 18 server packages and install the PostgreSQL 15 server packages before configuring PostgreSQL:
This should restore the intended path where changing postgres.template.yml to postgres.15.template.yml postpones the PostgreSQL 18 upgrade.