Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYXF0-0001Kg-Gl for pgsql-general@arkaria.postgresql.org; Tue, 12 May 2020 15:54:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jYXEy-0006je-Fv for pgsql-general@arkaria.postgresql.org; Tue, 12 May 2020 15:54:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYXEy-0006jX-8H for pgsql-general@lists.postgresql.org; Tue, 12 May 2020 15:54:44 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYXEv-0000fL-KA for pgsql-general@lists.postgresql.org; Tue, 12 May 2020 15:54:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 04CFseFU023101; Tue, 12 May 2020 11:54:40 -0400 From: Tom Lane To: Matthias Apitz cc: pgsql-general@lists.postgresql.org Subject: Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction In-reply-to: <20200512145352.GA32335@sh4-5.1blu.de> References: <20200512145352.GA32335@sh4-5.1blu.de> Comments: In-reply-to Matthias Apitz message dated "Tue, 12 May 2020 16:53:52 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23099.1589298880.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 12 May 2020 11:54:40 -0400 Message-ID: <23100.1589298880@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Matthias Apitz writes: > We're facing in our ESQL/C written application a situation where a > commit'ed INSERT into a table is rolled back. Kind of hard to believe ... is there any sign of distress in the postmaster log? > I have here the ESQL/C > logging of the problem: > ... > [1471] [12.05.2020 15:48:50:476]: ecpg_execute on line 1744: query: inse= rt into swd_daten ( katkey , aktion , reserv , id , ansetzung , nettodaten= ) values ( $1 , $2 , $3 , $4 , $5 , $6 ); with 6 parameter(s) on co= nnection sisis > [1471] [12.05.2020 15:48:50:476]: ecpg_process_output on line 1744: OK: = INSERT 0 1 > [1471] [12.05.2020 15:48:50:477]: ECPGtrans on line 6716: action "commit= "; connection "sisis" > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^= ^^^^^^^^^^^^^^^^^^^^^ It's striking that this log shows a server ack of the INSERT, but no serve= r ack of the COMMIT. Maybe that's just an oversight in the ESQL/C logging logic, but I wonder what's actually getting to the server. You might try enabling log_statement =3D all so you can get a trace of what the server thinks is happening. regards, tom lane