Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

Canceling statement due to conflict WITH recovery

Highlighted
One Star

Canceling statement due to conflict WITH recovery

Hi,
I begin by Talend and I have a problem I can not solve after all my research.
I need to import data from the operational base is in Postgres to our data warehouse. In a first time, the data is imported brut way before the transformations, calculations, etc.:
Operational system ---- | Talend | ----> DW -> Source -> Staging -> Fact & Dimensions
DBA did not want that connects directly to the DB then I try to do it via the mirror that contains exactly the same data. The target is also a Postgres DB (DW).
Currently I am trying to do first for a table very simply as followings:
tPosgresqlInput -> tPostgresqlOutput
but I have an error message:
 connecting to socket on port 3848
connected
Exception in component tPostgresqlInput_1
org.postgresql.util.PSQLException: ERROR: canceling statement due to conflict with recovery
Détail*: User query might have needed to see row versions that must be removed.
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1592)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1327)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:192)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:451)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:336)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:235)
at webregdata.importdata_0_1.ImportData.tPostgresqlInput_1Process(ImportData.java:960)
at webregdata.importdata_0_1.ImportData.tCreateTable_1Process(ImportData.java:446)
at webregdata.importdata_0_1.ImportData.runJobInTOS(ImportData.java:1544)
at webregdata.importdata_0_1.ImportData.main(ImportData.java:1409)
disconnected

I also tried tPosgresqlInput -> tFileOutputDelimited to see if my target was the problem but still the same problems.
After searching on the web, one of the reasons I think could be a problem of transaction ...
Thank you in advance.
Highlighted
Moderator

Re: Canceling statement due to conflict WITH recovery

Hi,
ERROR: canceling statement due to conflict with recovery
Détail*: User query might have needed to see row versions that must be removed.

It is probably caused by Postgresql DB.
Could you please check the technical article http://stackoverflow.com/questions/14592436/javadefaultpsqlexception-error-canceling-statement-due-t... to see if it is OK with your case?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog