Opened 4 years ago

Last modified 2 years ago

#24306 new New feature

Support for UNLOGGED tables in PostgreSQL

Reported by: freyley Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords: testing unlogged postgresql
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Change History (3)

comment:1 Changed 4 years ago by Tim Graham

Triage Stage: UnreviewedAccepted
Version: 1.7master

comment:2 Changed 3 years ago by Tim Graham

According to discussion on django-developers unlogged tables actually decreased performance for Django's own test suite.

comment:3 in reply to:  description Changed 2 years ago by Daniel Hahler

Replying to 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.

Note: See TracTickets for help on using tickets.
Back to Top