Skip to content

Commit

Permalink
Drop text indices on the failureline table
Browse files Browse the repository at this point in the history
  • Loading branch information
vrigal authored and Archaeopteryx committed Aug 31, 2023
1 parent ec51dda commit b052ec7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 4.1.9 on 2023-08-28 11:32

from django.db import migrations


class Migration(migrations.Migration):
"""
Drop indices on the Failure Line table as test and subtest
entries are too large compared to PostgreSQL limitations.
https://www.postgresql.org/docs/15/textsearch-limitations.html
"""

dependencies = [
('model', '0028_alter_textlogerror_unique_together'),
]

operations = [
migrations.AlterIndexTogether(
name='failureline',
index_together={('job_guid', 'repository')},
),
]
8 changes: 1 addition & 7 deletions treeherder/model/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -955,13 +955,7 @@ class FailureLine(models.Model):

class Meta:
db_table = 'failure_line'
index_together = (
('job_guid', 'repository'),
# Prefix index: test(50), subtest(25), status, expected, created
('test', 'subtest', 'status', 'expected', 'created'),
# Prefix index: signature(25), test(50), created
('signature', 'test', 'created'),
)
index_together = (('job_guid', 'repository'),)
unique_together = ('job_log', 'line')

def __str__(self):
Expand Down

0 comments on commit b052ec7

Please sign in to comment.