Opened 11 years ago

Last modified 4 months ago

#20960 new New feature

DEFAULT_TABLESPACE should be part of DATABASES

Reported by: Anssi Kääriäinen Owned by:
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: django@…, bcail Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no
Pull Requests:17902 build:success

Description

Currently DEFAULT_TABLESPACE is settings global. Of course, this short of thing is better set per-database. So, lets move DEFAULT_TABLESPACE and DEFAULT_INDEX_TABLESPACE to DATABASES['some_alias']['OPTIONS'].

This also allows those databases that do not support tablespaces to throw errors if tablespace is defined in options.

According to the ticket's flags, the next step(s) to move this issue forward are:

  • To improve the patch as described in the pull request review comments or on this ticket, then uncheck "Patch needs improvement".
  • If creating a new pull request, include a link to the pull request in the ticket comment when making that update. The usual format is: [https://github.com/django/django/pull/#### PR].

Change History (6)

comment:1 by Shai Berger, 11 years ago

Why in OPTIONS, and not in the main dictionary?

My understanding is that OPTIONS is for backend-specific parameters.

comment:2 by Aymeric Augustin, 11 years ago

Well, it depends if tablespaces are a standard concept in SQL (eg. mentioned in the ISO standard) or just something that happens to be implemented by several databases.

EDIT: a quick search in SQL 2003 gives no hit for "tablespace", supporting Anssi's original proposal.

Last edited 11 years ago by Aymeric Augustin (previous) (diff)

comment:3 by no, 11 years ago

Cc: django@… added

comment:4 by bcail, 12 months ago

Cc: bcail added
Has patch: set
Owner: changed from nobody to bcail
Status: newassigned

I opened a draft PR.

Some test runs are failing with the following error:
django.utils.deprecation.RemovedInDjango60Warning: The DEFAULT_TABLESPACE setting is deprecated.
How should I handle that error with the deprecated settings?

comment:5 by Mariusz Felisiak, 12 months ago

Patch needs improvement: set

comment:6 by bcail, 4 months ago

Owner: bcail removed
Status: assignednew
Note: See TracTickets for help on using tickets.
Back to Top