[Django] #24306: Support for UNLOGGED tables in PostgreSQL

86 views
Skip to first unread message

Django

unread,
Feb 8, 2015, 11:27:41 PM2/8/15
to django-...@googlegroups.com
#24306: Support for UNLOGGED tables in PostgreSQL
-------------------------------------+-------------------------------------
Reporter: freyley | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: 1.7
(models, ORM) | Keywords: testing unlogged
Severity: Normal | postgresql
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
According to stack overflow, unlogged tables are the way to go for testing
speed. See http://stackoverflow.com/questions/9407442/optimise-postgresql-
for-fast-testing/9407940#9407940 for example.

As part of another, now rejected ticket, somebody wrote support for
unlogged tables:

https://github.com/aptivate/django/commits/ticket_19891 first commit:
https://github.com/aptivate/django/commit/657a1fee1ad3899f1254a971f32a6cea7b11c0a3

Support for unlogged tables for testing would be really helpful for having
tests run faster.

--
Ticket URL: <https://code.djangoproject.com/ticket/24306>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Feb 13, 2015, 3:36:49 PM2/13/15
to django-...@googlegroups.com
#24306: Support for UNLOGGED tables in PostgreSQL
-------------------------------------+-------------------------------------
Reporter: freyley | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: testing unlogged | Triage Stage: Accepted
postgresql |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_docs: => 0
* needs_better_patch: => 0
* version: 1.7 => master
* needs_tests: => 0
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/24306#comment:1>

Django

unread,
Jul 31, 2015, 1:24:30 PM7/31/15
to django-...@googlegroups.com
#24306: Support for UNLOGGED tables in PostgreSQL
-------------------------------------+-------------------------------------
Reporter: freyley | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: testing unlogged | Triage Stage: Accepted
postgresql |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by timgraham):

According to [https://groups.google.com/d/topic/django-
developers/IkRgMxTTzPQ/discussion discussion on django-developers]
unlogged tables actually decreased performance for Django's own test
suite.

--
Ticket URL: <https://code.djangoproject.com/ticket/24306#comment:2>

Django

unread,
Oct 11, 2016, 12:47:17 PM10/11/16
to django-...@googlegroups.com
#24306: Support for UNLOGGED tables in PostgreSQL
-------------------------------------+-------------------------------------
Reporter: freyley | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: testing unlogged | Triage Stage: Accepted
postgresql |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Daniel Hahler):

Replying to [ticket:24306 freyley]:

> Support for unlogged tables for testing would be really helpful for
having tests run faster.

I've tried this a while ago (by hacking Django's internals) and there was
not much gain from it.
But I was using most(?) of https://www.postgresql.org/docs/current/static
/non-durability.html already.

--
Ticket URL: <https://code.djangoproject.com/ticket/24306#comment:3>

Django

unread,
Apr 19, 2021, 4:05:35 AM4/19/21
to django-...@googlegroups.com
#24306: Support for UNLOGGED tables in PostgreSQL
-------------------------------------+-------------------------------------
Reporter: freyley | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev

(models, ORM) |
Severity: Normal | Resolution:
Keywords: testing unlogged | Triage Stage: Accepted
postgresql |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Petr Přikryl):

* cc: Petr Přikryl (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/24306#comment:4>

Django

unread,
Nov 10, 2023, 11:32:34 AM11/10/23
to django-...@googlegroups.com
#24306: Support for UNLOGGED tables in PostgreSQL
-------------------------------------+-------------------------------------
Reporter: freyley | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: testing unlogged | Triage Stage: Accepted
postgresql |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by bcail):

A different use for UNLOGGED tables could be for the database cache
backend: https://martinheinz.dev/blog/105. Would it be an option to allow
specifying an `--unlogged` parameter for the `createcachetable` command to
create an UNLOGGED table for the database cache?

--
Ticket URL: <https://code.djangoproject.com/ticket/24306#comment:5>

Django

unread,
Nov 14, 2023, 2:50:44 PM11/14/23
to django-...@googlegroups.com
#24306: Support for UNLOGGED tables in PostgreSQL
-------------------------------------+-------------------------------------
Reporter: freyley | Owner: nobody
Type: New feature | Status: new
Component: Database layer | Version: dev
(models, ORM) |
Severity: Normal | Resolution:
Keywords: testing unlogged | Triage Stage: Accepted
postgresql |
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by bcail):

Some discussion [https://forum.djangoproject.com/t/ticket-24306
-postgresql-unlogged-tables/25335 here]. Looks like the Postgresql-
specific option may be a problem, and the UNLOGGED feature may not give
much performance improvement for caches.

--
Ticket URL: <https://code.djangoproject.com/ticket/24306#comment:6>

Reply all
Reply to author
Forward
0 new messages