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
0
Merge Requests
0
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
iv
gitlab-ce
Commits
f700f3ec
Commit
f700f3ec
authored
Jul 14, 2016
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable statement timeout outside of transaction and during adding concurrent index
parent
e5c7e118
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
lib/gitlab/database/migration_helpers.rb
lib/gitlab/database/migration_helpers.rb
+3
-1
No files found.
lib/gitlab/database/migration_helpers.rb
View file @
f700f3ec
...
@@ -20,6 +20,7 @@ module Gitlab
...
@@ -20,6 +20,7 @@ module Gitlab
if
Database
.
postgresql?
if
Database
.
postgresql?
options
=
options
.
merge
({
algorithm: :concurrently
})
options
=
options
.
merge
({
algorithm: :concurrently
})
disable_statement_timeout
end
end
add_index
(
table_name
,
column_name
,
options
)
add_index
(
table_name
,
column_name
,
options
)
...
@@ -140,8 +141,9 @@ module Gitlab
...
@@ -140,8 +141,9 @@ module Gitlab
'in the body of your migration class'
'in the body of your migration class'
end
end
transaction
do
disable_statement_timeout
disable_statement_timeout
transaction
do
add_column
(
table
,
column
,
type
,
default:
nil
)
add_column
(
table
,
column
,
type
,
default:
nil
)
# Changing the default before the update ensures any newly inserted
# Changing the default before the update ensures any newly inserted
...
...
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