Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
3604cb32
Commit
3604cb32
authored
Jul 05, 2021
by
Andreas Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disallow adding indexes with _ccnew suffix
parent
d2a92446
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
spec/db/schema_spec.rb
spec/db/schema_spec.rb
+12
-0
No files found.
spec/db/schema_spec.rb
View file @
3604cb32
...
...
@@ -264,6 +264,18 @@ RSpec.describe 'Database schema' do
end
end
context
'index names'
do
it
'disallows index names with a _ccnew[0-9]* suffix'
do
# During REINDEX operations, Postgres generates a temporary index with a _ccnew[0-9]* suffix
# Since indexes are being considered temporary and subject to removal if they stick around for longer. See Gitlab::Database::Reindexing.
#
# Hence we disallow adding permanent indexes with this suffix.
problematic_indexes
=
Gitlab
::
Database
::
PostgresIndex
.
match
(
"
#{
Gitlab
::
Database
::
Reindexing
::
ReindexConcurrently
::
TEMPORARY_INDEX_PATTERN
}
$"
).
all
expect
(
problematic_indexes
).
to
be_empty
end
end
private
def
retrieve_columns_name_with_jsonb
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment