Open JuHwon opened 4 months ago
error object of notice callback:
{
"severity_local":"WARNING",
"severity":"WARNING",
"code":"25001",
"message":"there is already a transaction in progress",
"file":"xact.c",
"line":"3799",
"routine":"BeginTransactionBlock"
}
maybe this is similar to this one: https://github.com/porsager/postgres/issues/274
according to the debug logs the client executes a BEGIN
statement on connection id e.g. 4
, and then a few ms laters it executes a BEGIN
statement with the same connection id again, before the first transaction was handled. there were no other statements between with the affected connection id.
The following query arbitrary causes an
UNSAVE_TRANSACTION
error.the error most likely happens when this code is executed very frequently and items is usually an array betwenn 0 and a few thousand items.
error:
to my understanding using sql.begin for something like this should be fine. have we found a bug here or is there something wrong with our code?