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 1olGnv-000472-1e for pgsql-general@arkaria.postgresql.org; Wed, 19 Oct 2022 21:40:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1olGmv-0006CW-QS for pgsql-general@arkaria.postgresql.org; Wed, 19 Oct 2022 21:39:45 +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 1olGmv-0006CM-Fs for pgsql-general@lists.postgresql.org; Wed, 19 Oct 2022 21:39:45 +0000 Received: from mout.gmx.net ([212.227.15.15]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1olGms-0002nB-EV for pgsql-general@lists.postgresql.org; Wed, 19 Oct 2022 21:39:44 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1666215581; bh=r1/YuysrSowXoHz78+W6kPRaV6qCTvQEfscJqzR6KPA=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=O4zLz1AaDO4ZD61tJBUjJ5CsTFjJ55qoNkLp5NP6Nwq3mZdZ7JxHvzg8JHFLnMo8G XCi2YT2BfQGQBYd1z+7jNqrPdIjakkLdeEbKIFUmGEdEBOh3NcvdstlCtcY0h+RTs4 cLBUjYCkhdwqtQMBm8O64QA9fhKpEEqq5OA2dDgs= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.178.20] ([83.171.173.102]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MJmKh-1oW4No2B4r-00KCAa for ; Wed, 19 Oct 2022 23:39:41 +0200 Subject: Re: COMMIT IN STORED PROCEDURE WHILE IN A LOOP To: pgsql-general@lists.postgresql.org References: <353091661.109766.1666124045054.ref@mail.yahoo.com> <353091661.109766.1666124045054@mail.yahoo.com> <72BEC008-DC6C-4D80-80A6-E1634CFFA656@thebuild.com> <2746245.1666128817@sss.pgh.pa.us> From: Thomas Kellerer Message-ID: <869dee44-007f-a50e-c673-bda96ea31b12@gmx.net> Date: Wed, 19 Oct 2022 23:39:41 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: de-DE Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:0U2d4cm6YI7DkJNos+9B9GKljYRIBrBCZcPcc7h2K5o7BZaXNf/ aAjelvdCMuxphciqs4rsMucmJBLEKk4Jr9rfFlV6NHNrW2nfOjxtxK9/r8bch3/Ib3XGVkB DPHLCx9AWn2aEHAxCBLjNdhZVMR/F8brttRjRZGXjzoOHPbUe/b8qoNxuFQTus1uFHZmaOd T2X1RkUmISNOqnwQBjdNA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:3S+4fjw48+E=:++CqNom4STKjG4z8ZVm+lp p4lmyNDsOPK1eakSHHN8sdfCmcFFg5XKKWMP0vH5cA4DczCtQDeluuY4yydBzUsCcACIToYk3 Lcfd7RNh4K6K6wMlQ6ktW0ECCYQ2TxxHS3KHyqbKQpU0vqbWGYKCRmsGrkpvcIBn9hDozLTJ7 cTaGTB32oc2D66zDvVYC7+N2jrDBiAclGljIxfU511qjbQ/6Rl/6d0fhDn/3/DvQXgNzT+Qk1 Yx2jzR36hUQiJi4tZzPiNlduDl3IIxt1NEZgvMeckLtiZ0tZb5R5Lsh0/7sDT9qYyPVcm1ZRh 1SaD+/iqUQQ4ygnlzjAggqZBr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P 2uftOCKlup4wKdBs+/j5K97ZujOiBhrTAuqEOzj/cKpBPay6hR7VQtdiQE/dfXuuqJjYfGlc1 3rJPPVJNeYehUNmRn5eCS+rv3n0Caijdsw8SFIj8YGcRYxWJHr/FhdWeoFEtL9uibCuBnMvER iORzITFls3ZwRoSrOvlIHOsoPmizpFsDlfkt33ysbQ3OX List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk gogala.mladen@gmail.com schrieb am 19.10.2022 um 01:46: > Amazon, lead by Kevin Closson, the guy who has famously designed > Oracle Exadata among other things, even came up with the recipe how > to migrate it to Postgres: > > https://aws.amazon.com/blogs/database/migrating-oracle-autonomous-transa= ctions-to-postgresql/ The workaround to use dblink to simulate autonomous transactions is nothin= g new, and has been floating around for quite a while. Here is a blog post from 2012 (6 years before the Amazon recipe was publis= hed) https://raghavt.blog/autonomous-transaction-in-postgresql-9-1/ and another one from 2016 https://blog.dalibo.com/2016/09/08/Pragma_Autonoumous_transactions.html