PostgreSQL Transactional Lock
Published 31 October 2023
PostgreSQL Transactional Lock
Description
Whether or not transactional advisory locks should be used with PostgreSQL.
If false, session-level locks will be used instead.
This should be set to false
for statements such as CREATE INDEX CONCURRENTLY
.
Default
true
Usage
Commandline
./flyway -postgresql.transactional.lock=false info
TOML Configuration File
[flyway]
[flyway.postgresql.transactional]
lock = false
Configuration File
flyway.postgresql.transactional.lock=false
Environment Variable
FLYWAY_POSTGRESQL_TRANSACTIONAL_LOCK=false
API
PostgreSQLConfigurationExtension configurationExtension = configuration.getPluginRegister().getPlugin(PostgreSQLConfigurationExtension.class)
configurationExtension.setTransactionalLock(false);
Gradle
flyway {
pluginConfiguration = [
postgresqlTransactionalLock: 'false'
]
}
Maven
<configuration>
<pluginConfiguration>
<postgresqlTransactionalLock>false</postgresqlTransactionalLock>
</pluginConfiguration>
</configuration>