Closed mjwwit closed 1 year ago
Thanks for reporting this issue, @mjwwit. Unfortunately, I wasn't able to reproduce this as you can see below:
(I've tried on pg_create_logical_replication_slot
as well).
Can you please share an example that reproduces this? A simple migration directory + a few pending files that one of them is tagged with txmode: none
. Note, file directives must be detached from statements with double new lines.
How odd, might it have something to do with my use of the golang-migrate
format migrations? Because your simple example does not work for me:
I am using atlas version v0.14.1-662f6d9-canary
by the way.
Users that use golang-migrate
format use the golang-migrate
for migration execution. If you're using Atlas for executing the migration files, you should use its default format. The other migration tools/formats are not aware of these directives.
Sorry for the confusion, and I'm pretty sure this will solve your issue 😃
It does solve the issue, thanks for the clarification.
I'm having trouble applying the following migration:
As you can see I am using file level transaction mode. This feature was seemingly introduced specifically to fix this exact issue (#1414). However, if this migration is applied using
migrate apply
, the following error is thrown:cannot create logical replication slot in transaction that has performed writes
. This error appears to indicate that the statement is still being executed inside of a transaction.I can only get this migration to run by explicitly setting
--tx-mode "none"
for all pending migrations, which I'd really like to avoid.I am not sure if this is a regression or if it was never truly fixed to begin with.