From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Shridhar Daithankar <shridhar_daithankar(at)persistent(dot)co(dot)in> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: DBLink cursors |
Date: | 2003-04-16 16:12:51 |
Message-ID: | 3E9D8103.4000901@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Shridhar Daithankar wrote:
> I was just going thr. dblink code and noticed that dblink cursors are wrapped
> in their own transaction.
yup -- been that way since 7.3 was released.
> If an application instantiates a transaction to do 10 things, one of which is
> to fetch a cursor over dblink, how will it work?
I guess it won't -- you're the first person who ever complained, so
quite possibly you're the first who's needed it.
> IMO the instantiation of transaction block should be left calling application,
> as done with normal cursors. DBLink would have to detect whether or not they
> are in a transaction block and abort accordingly.
>
> Or I misunderstood something?
No, you seem to understand correctly. Patches gratefully accepted ;-)
I think someone is working on nested transactions, which IIRC may make
it into 7.4. In this case, the issue will be moot, no? If not, I will
take a look at fixing it for 7.4. If you want to ensure that, submit a
patch. I'd think the best thing to do would be the following:
- detect transaction status
- if not in an explicit transaction block, start one
Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Sean Chittenden | 2003-04-16 16:17:25 | Re: [HACKERS] Are we losing momentum? |
Previous Message | Tom Lane | 2003-04-16 15:53:07 | Re: [HACKERS] Are we losing momentum? |