Re: [Django] #24018: Support journal_mode=WAL for sqlite

2024-02-09 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  Curtis Maloney   |Owner:  Aaron
 |  Linville
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Aaron Linville):

 * needs_better_patch:  1 => 0
 * needs_docs:  1 => 0

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018d8e1ab325-b349be14-9a83-41bc-bf73-b669c80c8d29-00%40eu-central-1.amazonses.com.


Re: [Django] #24018: Support journal_mode=WAL for sqlite

2024-02-09 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  Curtis Maloney   |Owner:  Aaron
 |  Linville
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by bcail):

 * cc: bcail (added)

Comment:

 Yup, exactly - so it shows up on the
 
[https://code.djangoproject.com/query?status=!closed_better_patch=0_tests=0_docs=0_patch=1=Accepted=1=changetime
 Patch review page].
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018d8df42373-0bfb93ad-ca3c-48fc-9e48-0a9a9d84d432-00%40eu-central-1.amazonses.com.


Re: [Django] #24018: Support journal_mode=WAL for sqlite

2024-02-08 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  Curtis Maloney   |Owner:  Aaron
 |  Linville
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Comment (by Aaron Linville):

 Replying to [comment:11 bcail]:
 > @Aaron, are you still wanting to work on this? If so, if you fix the
 tests you could update the flags on this issue so it goes back in the list
 of tickets to be reviewed.

 Yes, I've rebased it on latest and fixed the tests I think (a couple are
 still pending). Assume you mean uncheck the Needs doc and Patch needs
 improvement?
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018d8b0c330f-69dbfe0a-aa6b-462a-8309-e1c8df4d7d5f-00%40eu-central-1.amazonses.com.


Re: [Django] #24018: Support journal_mode=WAL for sqlite

2024-02-07 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  Curtis Maloney   |Owner:  Aaron
 |  Linville
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Comment (by bcail):

 @Aaron, are you still wanting to work on this? If so, if you fix the tests
 you could update the flags on this issue so it goes back in the list of
 tickets to be reviewed.
-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018d8577cece-307a4859-67c6-443d-a55d-41b43c5af51d-00%40eu-central-1.amazonses.com.


Re: [Django] #24018: Support journal_mode=WAL for sqlite

2023-08-17 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  Curtis Maloney   |Owner:  Aaron
 |  Linville
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Aaron Linville):

 Replying to [comment:9 Afonso Silva]:
 > I think having this natively in Django would be useful, is there any
 help needed for the previous linked PR?

 I updated the PR and modified it with a more compelling example;
 `synchronous=0` will not persist.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018a06314836-c9cc4558-f09f-48a7-99c0-d25e1bb07519-00%40eu-central-1.amazonses.com.


Re: [Django] #24018: Support journal_mode=WAL for sqlite

2023-08-17 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  Curtis Maloney   |Owner:  Aaron
 |  Linville
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Afonso Silva):

 Based on the previous answers, a workaround for allowing `init_command`
 similar to MySQL is to use a signal receiver for `connection_created`,
 e.g.:

 {{{#!python
 from django.conf import settings
 from django.db.backends.signals import connection_created
 from django.dispatcher import receiver

 @receiver(connection_created)
 def init_command(sender, connection, **kwargs) -> None:
 command = connection.settings_dict["OPTIONS"].get("init_command")
 if connection.vendor == "sqlite" and command:
 cursor = connection.cursor()
 cursor.execute(command)
 }}}

 This way you could add `init_command` to your `settings.py`:

 {{{#!python
 DATABASES = {
  'default': {
  'ENGINE': 'django.db.backends.sqlite3',
  'NAME': BASE_DIR / 'db.sqlite3',
  'OPTIONS': {
  'init_command': 'PRAGMA journal_mode=wal;'
  }
 }
 }

 }}}

 I think having this natively in Django would be useful, is there any help
 needed for the previous linked PR?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018a02f0b11d-7d104f2c-c442-4d9f-8b40-e9a5b49a4776-00%40eu-central-1.amazonses.com.


Re: [Django] #24018: Support journal_mode=WAL for sqlite

2021-09-02 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  Curtis Maloney   |Owner:  Aaron
 |  Linville
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Carlton Gibson):

 Maybe allowing `PRAGMAS` to be set is a good idea, in general (e.g.
 #31765) but the WAL setting is persistent:

 > The persistence of WAL mode means that applications can be converted to
 using SQLite in WAL mode without making any changes to the application
 itself. One has merely to run "PRAGMA journal_mode=WAL;" on the database
 file(s) using the command-line shell or other utility, then restart the
 application. [https://sqlite.org/wal.html#persistence_of_wal_mode SQLite
 Docs].

 So narrowly, running that a single time is sufficient, and an entry in the
 [https://docs.djangoproject.com/en/3.2/ref/databases/#sqlite-notes SQLite
 notes] may be the quickest route forward (for this narrower issue).

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.c27cc39870460f754f134dea796a08ab%40djangoproject.com.


Re: [Django] #24018: Support journal_mode=WAL for sqlite

2021-09-02 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  Curtis Maloney   |Owner:  Aaron
 |  Linville
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  1
  Needs tests:  0|  Patch needs improvement:  1
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * needs_better_patch:  0 => 1
 * needs_docs:  0 => 1


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.c29384675611916a9a0981728c70b23d%40djangoproject.com.


Re: [Django] #24018: Support journal_mode=WAL for sqlite

2021-09-01 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  Curtis Maloney   |Owner:  Aaron
 |  Linville
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  1|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Aaron Linville):

 * has_patch:  0 => 1


Comment:

 https://github.com/django/django/pull/14824

 I needed the ability to adjust some pragma settings associated with
 caching but as Artem noted, this will work for any pragma setting.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.8476beb60e63556dddbe93efe04ac6d6%40djangoproject.com.


Re: [Django] #24018: Support journal_mode=WAL for sqlite

2021-09-01 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  Curtis Maloney   |Owner:  Aaron
 |  Linville
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  dev
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Aaron Linville):

 * owner:  Curtis Maloney => Aaron Linville


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.b9d0cbed02bce8f5a05f39e485a57564%40djangoproject.com.


Re: [Django] #24018: Support journal_mode=WAL for sqlite

2017-06-13 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  Curtis Maloney   |Owner:  Curtis
 |  Maloney
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by tonnzor):

 As a workaround, you could use https://stackoverflow.com/a/6843199 (use
 `connection_created` signal)

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.3cd05de0d946bd1580ebc4c99b9d4152%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24018: Support journal_mode=WAL for sqlite

2017-06-13 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  Curtis Maloney   |Owner:  Curtis
 |  Maloney
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by tonnzor):

 Any progress here?

 We could add `init_command` to `OPTIONS` for sqlite backend like for
 MySQL.

 Then you would be able to use any PRAGMA we need:

 {{{
 DATABASES = {
 'default': {
 'ENGINE': 'django.db.backends.sqlite3',
 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
 'OPTIONS': {
 'init_command': 'PRAGMA journal_mode=wal;',
 }
 }
 }
 }}}

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.f680dc79deba136e865d6ee16d8b47f4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24018: Support journal_mode=WAL for sqlite

2014-12-18 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  funkybob |Owner:  funkybob
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Accepted
 Keywords:   |  Needs documentation:  0
Has patch:  0|  Patch needs improvement:  0
  Needs tests:  0|UI/UX:  0
Easy pickings:  0|
-+-
Changes (by timgraham):

 * stage:  Unreviewed => Accepted


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.12b2657378503b2f23e3178d98c043ce%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #24018: Support journal_mode=WAL for sqlite

2014-12-17 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
 Reporter:  funkybob |Owner:  funkybob
 Type:  New feature  |   Status:  assigned
Component:  Database layer   |  Version:  master
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by funkybob):

 * owner:  nobody => funkybob
 * status:  new => assigned


--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.6ec017678071f7a6e59fc5e18daad9ca%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


[Django] #24018: Support journal_mode=WAL for sqlite

2014-12-17 Thread Django
#24018: Support journal_mode=WAL for sqlite
-+-
   Reporter:  funkybob   |  Owner:  nobody
   Type:  New| Status:  new
  feature|Version:  master
  Component:  Database   |   Keywords:
  layer (models, ORM)|  Has patch:  0
   Severity:  Normal |Needs tests:  0
   Triage Stage: |  Easy pickings:  0
  Unreviewed |
Needs documentation:  0  |
Patch needs improvement:  0  |
  UI/UX:  0  |
-+-
 SQLite, as of 3.7, supports a WAL journal mode
 [https://www.sqlite.org/wal.html]

 It's been my experience that enabling this can dramatically improve
 performance, especially under heavy writes.  I've seen some write-heavy
 operations go from a couple of minutes to a few seconds.

 It can be enabled by executing the command:

 PRAGMA journal_mode=wal;

 which will return 'wal' on success.

 If it fails to apply for any reason, it will return the mode it is in -
 'delete' or 'memory'.

 I propose to add JOURNAL_MODE as an option to the sqlite backend.

 however, some quick tinkering shows that the sqlite backend doesn't ever
 explicitly create the DB, so it's not immediately apparent how to detect
 if/when this command should be issued.

 I am still investigating.

--
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.7bb7b244796f78ce34ff5dbc7e3c49bb%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.