﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35394	Warning if 'postgres' database has been rename (e.g. DigitalOcean managed)	Jeffry Babb	nobody	"This warning is thrown if the 'postgres' database does not exist on the server.  DigitalOcean renames this database to 'defaultdb' which seems to raise this error in dango/db/backends/base/base.py


{{{
        except (Database.DatabaseError, WrappedDatabaseError):
            if cursor is not None:
                raise
            warnings.warn(
                ""Normally Django will use a connection to the 'postgres' database ""
                ""to avoid running initialization queries against the production ""
                ""database when it's not needed (for example, when running tests). ""
                ""Django was unable to create a connection to the 'postgres' database ""
                ""and will use the first PostgreSQL database instead."",
                RuntimeWarning,
            )
}}}

I have searched in the LIBPQ parameters can can't find a setting that allows me to specify this name change as Django seems to have hard-coded the search for the 'postgres' db name or is looking for it in a key called 'service' around line 193 and 218 in base.py.

"	Cleanup/optimization	new	Database layer (models, ORM)	5.0	Normal		postgres default db name		Unreviewed	0	0	0	0	0	0
