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 1jYt6w-00072r-ML for pgsql-general@arkaria.postgresql.org; Wed, 13 May 2020 15:15:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jYt6v-0004NV-IU for pgsql-general@arkaria.postgresql.org; Wed, 13 May 2020 15:15:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYt6t-0004NO-Pp for pgsql-general@lists.postgresql.org; Wed, 13 May 2020 15:15:53 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYt6o-0007SX-23 for pgsql-general@lists.postgresql.org; Wed, 13 May 2020 15:15:50 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 7844176E; Wed, 13 May 2020 11:15:42 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 13 May 2020 11:15:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=f QpJdsiPn6Bm1hzPTSJ22v/Iv2SkZUzDIQJBd7ly3SA=; b=S1nxWWl3wNz6HYeyz 3me753NFXi1kBD/ZSVXWyed5yjBoT49Yaf3vUXx8YySSEBJ09pB3Lcqh4KTt7ObB LS8TjImgImEZiO5Vuq9CukBxOahZQYCDwtoBEi+n9jPJeH/9LNaWmBZ8dJg4Weo5 DJJea+GkPq7lkyMe1AZjFqsXsnAzbDcUBNW/2hQU6G2W7scCCXmEofM8zilDbfog P0VPr9paT+78gZ3TVxGNwVR44P7yvCowJ7EFSqVtFIh+i2+ayD6uaku/2xP5Bu91 aB78FrSiRmXlOunvQkb0Y+/LQEPnUWuqi4tD65WIcQEwO2Ak5yJzpfNAm3bjETDh r6DGA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=fQpJdsiPn6Bm1hzPTSJ22v/Iv2SkZUzDIQJBd7ly3 SA=; b=hMa2AaiEWQYM2X63OI6X0EfA5qcE5KFuFqG6u5AiS/Umq7uJFfUHLvWPv nL0zkRtfHy0+MCQNu9JBkrgqlJIkobzRjGjlZBjrSI4zIyAa4IYDDGAFmZmYQmaT mziv7AwpeTjQVhTufCMNneMtqysq6l+Cq4kduNZz4Gf67Gz/xSqg2zbojmvy2NSy 2f2G/Zpcfy2nGq/m3GMGbDkCW08XL2cBn26KTkGUFd04N2F5D007mi34yeLSCWOn ZLXWv0EfNKmJNXAEkvlUWrr33YtQfUJvs13aPu5VWZ7P2qUHbX5E/vtxAD3K9HXS bbXZM7sHHBQIsYKcRRT/I+yIys+Ow== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrleeggdekiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtgfesthekre dttdefjeenucfhrhhomheptegurhhirghnucfmlhgrvhgvrhcuoegrughrihgrnhdrkhhl rghvvghrsegrkhhlrghvvghrrdgtohhmqeenucggtffrrghtthgvrhhnpeevveefveefue egffekkefhgeeiueffgfetueejvdfghfeujeejhfekjeelgedtgeenucfkphepjeehrddu jedvrdehrddvfedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Received: from [192.168.1.3] (75-172-5-231.tukw.qwest.net [75.172.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id 45DC63066312; Wed, 13 May 2020 11:15:41 -0400 (EDT) Subject: Re: ESQL/C: a ROLLBACK rolls back a COMMITED transaction To: Matthias Apitz , pgsql-general@lists.postgresql.org References: <20200512145352.GA32335@sh4-5.1blu.de> <23100.1589298880@sss.pgh.pa.us> <20200512191429.GB32335@sh4-5.1blu.de> <9dbc6477-f9a2-b62a-e011-0983fe150741@aklaver.com> <20200512235207.GA3420@sh4-5.1blu.de> <20200513053405.GB26063@sh4-5.1blu.de> From: Adrian Klaver Message-ID: Date: Wed, 13 May 2020 08:15:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 MIME-Version: 1.0 In-Reply-To: <20200513053405.GB26063@sh4-5.1blu.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 5/12/20 10:34 PM, Matthias Apitz wrote: > El día Dienstag, Mai 12, 2020 a las 05:17:33 -0700, Adrian Klaver escribió: > >>>> insert into swd_auftrag .. >>>> >>>> COMMIT? >>> >>> This question (if it was a question) I don't understand. >> >> From your original message: >> >> "The INSERT of 1 row into table swd_daten was OK and commit'ed (marked line) >> and a later rollback (last line) seems to roll it back, at least the row >> isn't in the table." >> >> It was not clear to me whether: >> >> "[1471] [12.05.2020 15:48:50:478]: ecpg_execute on line 1637: query: insert >> into swd_auftrag ( setnr , aufnum , katkey , userid , seqcount ) values ( $1 >> , $2 , $3 , $4 , $5 ); with 5 parameter(s) on connection sisis >> [1471] [12.05.2020 15:48:50:478]: ecpg_process_output on line 1637: OK: >> INSERT 0 1" >> >> also COMMITT(ed) or not? > > As I said in the original post of this thread: > > [1471] [12.05.2020 15:48:50:476]: ecpg_execute on line 1744: query: insert into swd_daten ( katkey , aktion , reserv , id , ansetzung , nettodaten ) values ( $1 , $2 , $3 , $4 , $5 , $6 ); with 6 parameter(s) on connection 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" > ... > > i.e. the COMMIT is done in the same connection(!) right after the > INSERT. There is no other ESQL/C call logged (and done) between. > > There is only no ACK from the ESQL/C layer about the COMMIT of > ECPGtrans, but this is a fault in the ESQL/C layer code, because the > ECPGtrans is logged before executing it and afterward if it's done OK no > message is generated. In your original post you had: "We're facing in our ESQL/C written application a situation where a commit'ed INSERT into a table is rolled back. I have here the ESQL/C logging of the problem:" ... "The INSERT of 1 row into table swd_daten was OK and commit'ed (marked line) and a later rollback (last line) seems to roll it back, at least the row isn't in the table. Any ideas? The connection is not set to AUTOCOMMIT." You then included a sequence of log messages that ended with a "rollback". Within that sequence was the INSERT to swd_auftrag. It seemed reasonable to ask whether that INSERT rolled back also. That is if the intent of this thread is to figure out why the INSERT was rolled back. If the thread has changed to fixing ESQL/C logging then ignore the above. > > matthias > > -- Adrian Klaver adrian.klaver@aklaver.com