Re: transaction and insert

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: jackchen88(at)gmail(dot)com
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: transaction and insert
Date: 2019-07-17 18:37:45
Message-ID: CAKFQuwYJMirR67W6b399FmnA50BELcvB4Gv47EimqYhm_Vd4LQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

aOn Wed, Jul 17, 2019 at 11:24 AM jack chen <jackchen88(at)gmail(dot)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.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message jack chen 2019-07-17 18:43:48 Re: transaction and insert
Previous Message jack chen 2019-07-17 18:11:28 transaction and insert