Re: transaction and insert - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: transaction and insert
Date
Msg-id CAKFQuwYJMirR67W6b399FmnA50BELcvB4Gv47EimqYhm_Vd4LQ@mail.gmail.com
Whole thread Raw
In response to transaction and insert  (jack chen <jackchen88@gmail.com>)
Responses RE: transaction and insert  ("Vianello, Daniel A" <Daniel.Vianello@charter.com>)
Re: transaction and insert  (jack chen <jackchen88@gmail.com>)
List pgsql-bugs
aOn Wed, Jul 17, 2019 at 11:24 AM jack chen <jackchen88@gmail.com> wrote:
Can anyone help me? It looks like that it is real bug.

Mostly likely but its your application's bug, not PostgreSQL's.

 
When I use the PostgreSQL 10, it happen to me. After that, I have upgraded my PostgreSQL to version 11 with new JDBC. It is the same as before,

Expected...
 
eg. I have a transaction block with sql select and insert statements. At the beginning, eg. it is working fine at first 30 or 50 tests. After that, I have unusual error, eg. when I comment out the transaction statements (begin and commit), it works fine again.

Doubtful, you probably still have an error you are probably just ignoring it when you forgo transactions.

Can anyone tell me how to debug this? Or how to output more error information?

Focus on debugging and instrumenting your application until it sees the error and then dump out the data the application is sending to the server.
 
Or anyone can give a clue what is the problem. Is it memory not enough or cache not enough? I also have run vacuum  and restart the PostgreSQL, the error still exists.

Given the error message below your problem is happening during data ingestion and does not likely pertain to any data already existing in tables or indexes.  Vaccum/memory/cache have nothing to do with it.

The error is : ERROR: invalid input syntax for integer:

Server log for PostgreSQL or, probably more usefully, the application log of the problem that sending what appears to be an empty string and expecting the server to convert that into an integer.  The empty string cannot be cast to integer, only numbers and NULL can be.

David J.

pgsql-bugs by date:

Previous
From: jack chen
Date:
Subject: transaction and insert
Next
From: jack chen
Date:
Subject: Re: transaction and insert