Обсуждение: disable pipeline mode

Поиск
Список
Период
Сортировка

disable pipeline mode

От
Oleksandr Volkovskyi
Дата:

Hi Postgres team,

I am trying to apply migration but getting issues similar to the following:
       Reason: liquibase.exception.DatabaseException: ERROR: CREATE INDEX CONCURRENTLY cannot be executed within a pipeline


We have a tons of script and services and its not feasible to modify all of them, it will take couple of days to me…

Can someone please advise how can I disable pipeline mode or where can I find installer or binaries for postgres 13.7 ?
Maybe there is any pages on how can I downgrade 13.10 to 13.7 ?  

Thanks,
Alex

This email is confidential to the intended recipient. If you have received it in error, please notify the sender and delete it from your system. Any unauthorised use, disclosure or copying is not permitted. This email has been checked for viruses, but no liability is accepted for any damage caused by any virus transmitted by this email. Modulr Holdings Limited & Subsidiaries, Registered Office Scale Space, 58 Wood Lane, London W12 7RZ, United Kingdom. Registered in England No. 09895588. Modulr FS Limited is a company registered in England with company number 09897919 and ICO registration: ZA183098, authorised and regulated by the Financial Conduct Authority as an Electronic Money Institution (Firm Reference Number: 900573). Modulr Finance BV is a company registered in the Netherlands with company number 81852401, authorised and regulated by the De Nederlandsche Bank (DNB) as an Electronic Money Institution (relationship number R182870).

Re: disable pipeline mode

От
"Daniel Verite"
Дата:
    Oleksandr Volkovskyi wrote:

> I am trying to apply migration but getting issues similar to the following:
> Reason: liquibase.exception.DatabaseException: ERROR: CREATE INDEX
> CONCURRENTLY cannot be executed within a pipeline
>
> We have a tons of script and services and its not feasible to modify all of
> them, it will take couple of days to me...
>
> Can someone please advise how can I disable pipeline mode or where can I
> find installer or binaries for postgres 13.7 ?
> Maybe there is any pages on how can I downgrade 13.10 to 13.7 ?

There was an identical report previously:

https://www.postgresql.org/message-id/56b56a3e-81c0-41eb-ad96-7e5e02fe6357@gmail.com

There's an open issue at liquibase:
https://github.com/liquibase/liquibase/issues/3806

I've just commented over there to mention that a pipeline and a JDBC batch
were
the same thing, and it looks like they're using Statement.executeBatch() to
send the SQL statements.
The root cause is that CREATE INDEX CONCURRENTLY can neither be run in an
implicit
transaction (in other words inside a batch or a pipeline, that's the same),
nor in an explicit transaction.
So in a migration, if a user has a bunch of statements that they want to be
executed
in an "all or nothing succeeds " mode, they need to extract the CREATE INDEX
CONCURRENTLY statements from the rest, and run them separately.


Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite