summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorsuraj <suraj.shaw@oracle.com>2024-09-10 20:56:16 +0530
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-12-17 11:26:32 +0100
commit0d9872fc9a70ef6966930c68c68febea7eb60ede (patch)
treeeb61a0623f7c0bceb5eeb05c36839cfa98cb2d64 /docs
parent2249370c8611d97f8bdb6003fb7b4d8fd3646202 (diff)
Fixed #7732 -- Added support for connection pools on Oracle.
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/databases.txt42
-rw-r--r--docs/releases/5.2.txt6
2 files changed, 47 insertions, 1 deletions
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
index 57e94140c2..d19c78b9ec 100644
--- a/docs/ref/databases.txt
+++ b/docs/ref/databases.txt
@@ -994,7 +994,7 @@ Oracle notes
============
Django supports `Oracle Database Server`_ versions 19c and higher. Version
-1.3.2 or higher of the `oracledb`_ Python driver is required.
+2.3.0 or higher of the `oracledb`_ Python driver is required.
.. deprecated:: 5.0
@@ -1105,6 +1105,46 @@ Example of a full DSN string::
"(CONNECT_DATA=(SERVICE_NAME=orclpdb1)))"
)
+.. _oracle-pool:
+
+Connection pool
+---------------
+
+.. versionadded:: 5.2
+
+To use a connection pool with `oracledb`_, set ``"pool"`` to ``True`` in the
+:setting:`OPTIONS` part of your database configuration. This uses the driver's
+`create_pool()`_ default values::
+
+ DATABASES = {
+ "default": {
+ "ENGINE": "django.db.backends.oracle",
+ # ...
+ "OPTIONS": {
+ "pool": True,
+ },
+ },
+ }
+
+To pass custom parameters to the driver's `create_pool()`_ function, you can
+alternatively set ``"pool"`` to be a dict::
+
+ DATABASES = {
+ "default": {
+ "ENGINE": "django.db.backends.oracle",
+ # ...
+ "OPTIONS": {
+ "pool": {
+ "min": 1,
+ "max": 10,
+ # ...
+ }
+ },
+ },
+ }
+
+.. _`create_pool()`: https://python-oracledb.readthedocs.io/en/latest/user_guide/connection_handling.html#connection-pooling
+
Threaded option
---------------
diff --git a/docs/releases/5.2.txt b/docs/releases/5.2.txt
index 58d5727f32..918bd6a700 100644
--- a/docs/releases/5.2.txt
+++ b/docs/releases/5.2.txt
@@ -197,6 +197,9 @@ Database backends
instead of ``utf8``, which is an alias for the deprecated character set
``utf8mb3``.
+* Oracle backends now support :ref:`connection pools <oracle-pool>`, by setting
+ ``"pool"`` in the :setting:`OPTIONS` part of your database configuration.
+
Decorators
~~~~~~~~~~
@@ -464,6 +467,9 @@ Miscellaneous
* :meth:`.QuerySet.update_or_create`
* :meth:`.QuerySet.aupdate_or_create`
+* The minimum supported version of ``oracledb`` is increased from 1.3.2 to
+ 2.3.0.
+
.. _deprecated-features-5.2:
Features deprecated in 5.2