You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`x-multi-statement-max-size`|`MultiStatementMaxSize`| Maximum size of single statement in bytes (default: 10MB) |
9
11
|`dbname`|`DatabaseName`| The name of the database to connect to |
10
12
|`search_path`|| This variable specifies the order in which schemas are searched when an object is referenced by a simple name with no schema specified. |
11
13
|`user`|| The user to sign in as |
@@ -27,3 +29,10 @@
27
29
2. Wrap your existing migrations in transactions ([BEGIN/COMMIT](https://www.postgresql.org/docs/current/static/transaction-iso.html)) if you use multiple statements within one migration.
28
30
3. Download and install the latest migrate version.
29
31
4. Force the current migration version with `migrate force <current_version>`.
32
+
33
+
## Multi-statement mode
34
+
35
+
In PostgreSQL running multiple SQL statements in one `Exec` executes them inside a transaction. Sometimes this
36
+
behavior is not desirable because some statements can be only run outside of transaction (e.g.
37
+
`CREATE INDEX CONCURRENTLY`). If you want to use `CREATE INDEX CONCURRENTLY` without activating multi-statement mode
38
+
you have to put such statements in a separate migration files.
0 commit comments