#24371 closed Cleanup/optimization (fixed)
Recommend that new projects start with PostgreSQL
Reported by: | Carl Meyer | Owned by: | nobody |
---|---|---|---|
Component: | Documentation | Version: | 1.7 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
A recurring issue on #django
is users who have built a project locally using SQLite, and get to the point of wanting to deploy it, and want to switch to PostgreSQL. This introduces another sometimes-significant hurdle in their deployment learning curve (which is already unfortunately steep). In general I think users would be better off if they just started with PostgreSQL instead.
I don't think it's feasible to change the default project template off of SQLite, simply because of the "built-in, works out of the box" factor. But I think we could/should add a call-out to the tutorial, along the lines of "when starting your first real project, you may want to start out right away with a production-level database like PostgreSQL, to avoid database-switching headaches down the road."
Attachments (1)
Change History (11)
comment:1 by , 10 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 10 years ago
One particular pain point for MySQL users (and many people start with MySQL) is to figure out:
# in development (need a superuser to create the test database) $ createuser -S foo $ createdb foo -O foo # in production $ createuser foo $ createdb foo -O foo
We should document that if we don't already.
comment:3 by , 10 years ago
Aymeric, I don't see why your previous comment is specific to MySQL. For any database, isn't a requirement that the database user used for running tests needs the "CREATE DATABASE" permission (SQLite aside)?
comment:4 by , 10 years ago
Usually you manage MySQL users and tables from within the MySQL shell with special commands. I remember having to use shell commands instead as a problem for me about 5 years ago.
The problem is compounded by:
- the need to run commands as the
postgres
user (sudo su postgres) - the learning curve of pg_hba.conf, which is why I'm suggesting to use a superuser for local development
comment:5 by , 10 years ago
Oh, I completely misread comment:2, sorry. Was probably not completely awake. And yes, it's also my experience that user management in Postgres might be a little more tricky than on MySQL.
by , 10 years ago
Attachment: | 24371.diff added |
---|
comment:6 by , 10 years ago
Has patch: | set |
---|
comment:7 by , 10 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
I'm not sure where the extra instructions would go, so let's keep it simple for now.
comment:8 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
We already recommend postgres in the faq, but I think it would be helpful to recommend it in the tutorial too. I wouldn't mind some basic "how to create the database" commands too.
https://docs.djangoproject.com/en/dev/faq/install/#what-are-django-s-prerequisites