Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 95C139FB544 for ; Tue, 26 Jun 2007 04:26:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 64030-01 for ; Tue, 26 Jun 2007 04:26:25 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from interscan.indicator.com (mail.indicator.be [193.121.199.3]) by postgresql.org (Postfix) with ESMTP id ECAF49FB4FE for ; Tue, 26 Jun 2007 04:26:26 -0300 (ADT) Received: from webaccess.indicator.be ([10.100.1.7]) by interscan.indicator.com with InterScan Message Security Suite; Tue, 26 Jun 2007 09:10:59 +0200 Received: from DOMEXT-MTA by webaccess.indicator.bewith Novell_GroupWise; Tue, 26 Jun 2007 09:26:25 +0200 Message-Id: <4680DBBB.A3DD.0030.0@indicator.be> X-Mailer: Novell GroupWise Internet Agent 7.0.1 Date: Tue, 26 Jun 2007 09:26:19 +0200 From: "Bart Degryse" To: Subject: Re: Transactions and Exceptions References: <467BE1BB.A3DD.0030.0@indicator.be><467BCDA1.9070606@archonet.co m><467BF045.A3DD.0030.0@indicator.be><467BF045.A3DD.0030.0@indicator.be>< 467C0011.8000805@archonet.com> In-Reply-To: <467C0011.8000805@archonet.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__Part9ABD518B.0__=" X-imss-version: 2.047 X-imss-result: Passed X-imss-approveListMatch: *@indicator.be X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.209 tagged_above=0 required=5 tests=AWL=0.257, BAYES_40=-0.185, FORGED_RCVD_HELO=0.135, HTML_MESSAGE=0.001, UNPARSEABLE_RELAY=0.001 X-Spam-Level: X-Archive-Number: 200706/212 X-Sequence-Number: 28702 --=__Part9ABD518B.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable >>>> Richard Huxton 2007-06-22 19:00 >>> >Bart Degryse wrote: >>> 2. Using dblink / dbi-link to reconnect to the database, which = means=20 >>> your logging will take place in its own transaction. >> This I like more. Though I don't use either dblink nor dbi-link, I do = use this kind of=20 >> 'double' connections already for other purposes in which transactions = were never an=20 >> issue. So it never crossed my mind that I could use them for this too. >> For the time being that's the way I'll walk. Thanks a lot! >> =20 >> Reading your suggestions I assume PostgreSQL lacks something like = Oracle's >> PRAGMA AUTONOMOUS_TRANSACTION > >It might well be a useful feature (particularly for logging-style=20 >interactions as you have). I'm not sure it's particularly simple to do=20 >(other than by having a whole new backend as dblink will give you). > >> Shouldn't it be added, are there any plans in that direction? Returning = a status code >> is not always an option and using some dbi variant certainly isn't = because of the=20 >> need for perlu. So then you're stuck?! > >Well, dblink is pure C iirc. I think the advantage with dbi-link is = that=20 >you can connect to any type of database DBI can. > >--=20 > Richard Huxton > Archonet Ltd You're right of course about dblink. We never installed it though because = it=20 lacks the ability to connect to non-postgresql databases. dbi-link on the = other hand didn't make it either because of the overhead. It basically duplicates= all tables=20 in the source database, which is too much if you only need say 8 tables of = the 300=20 that exist. So we have chosen to make our own 'interface' having just what = we need=20 and nothing more. Using it to have our logging system in a seperate = transaction is perfectly possible, we just didn't think of it ourselfs. Nevertheless I = think an=20 equivalent to PRAGMA AUTONOMOUS_TRANSACTION would be nice to have. Thanks for your help and insight Richard. =20 --=__Part9ABD518B.0__= Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Description: HTML
>>>> Richard Huxton <dev@archonet.com> 2007-06-22 = 19:00 >>>
>Bart Degryse wrote:
>>> 2. Using = dblink / dbi-link to reconnect to the database, which means
>>>= ; your logging will take place in its own transaction.
>> This I = like more. Though I don't use either dblink nor dbi-link, I do use this = kind of
>> 'double' connections already for other purposes in = which transactions were never an
>> issue. So it never crossed = my mind that I could use them for this too.
>> For the time being = that's the way I'll walk. Thanks a lot!
>> 
>> = Reading your suggestions I assume PostgreSQL lacks something like = Oracle's
>> PRAGMA AUTONOMOUS_TRANSACTION
>
>It might = well be a useful feature (particularly for logging-style
>interactio= ns as you have). I'm not sure it's particularly simple to do
>(other= than by having a whole new backend as dblink will give you).
>
&g= t;> Shouldn't it be added, are there any plans in that direction? = Returning a status code
>> is not always an option and using some = dbi variant certainly isn't because of the
>> need for perlu. So = then you're stuck?!
>
>Well, dblink is pure C iirc. I think = the advantage with dbi-link is that
>you can connect to any type of = database DBI can.
>
>--
>   Richard Huxton
= >   Archonet Ltd
You're right of course about dblink. We never installed it though = because it
lacks the ability to connect to non-postgresql databases. dbi-link on = the other
hand didn't make it either because of the overhead. It basically = duplicates all tables
in the source database, which is too much if you only need say 8 = tables of the 300
that exist. So we have chosen to make our own 'interface' having just = what we need
and nothing more. Using it to have our logging system in a seperate = transaction is
perfectly possible, we just didn't think of it ourselfs. Nevertheless = I think an
equivalent to PRAGMA AUTONOMOUS_TRANSACTION would be nice to = have.
Thanks for your help and insight Richard.
 
--=__Part9ABD518B.0__=--