From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Don Baccus <dhogaza(at)pacifier(dot)com> |
Cc: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, mlw <markw(at)mohawksoft(dot)com>, owensmk(at)earthlink(dot)net, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: Connection Pooling, a year later |
Date: | 2001-12-18 19:56:31 |
Message-ID: | 200112181956.fBIJuVB04553@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> Bruce Momjian wrote:
>
>
> >
> > The trick for that is to call COMMIT before you pass the backend to a
> > new person.
>
>
> The failure to COMMIT is a programmer error - ROLLBACK's much safer. At
> least that's what we decided in the AOLserver community, and that's
> what the drivers for Oracle and PG (the two I maintain) implement.
Then you can issue a "BEGIN;ROLLBACK;" when you pass the session to the
next user, and "RESET ALL;" of course.
> > Now, if you want to abort a left-over transaction, you can
> > do an ABORT but that is going to show up in the server logs because an
> > ABORT without a transaction causes an error message.
>
>
> The connection pooling mechanism needs to track the transaction state
> and only ROLLBACK a handle that's not in autocommit state or in the
> midst of a BEGIN/END transaction (again, Oracle vs. PG)..
Seems like a lot of work to keep track of transaction state in the
client; seems easier to just unconditionally issue the begin;rollback.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Don Baccus | 2001-12-18 20:12:48 | Re: Concerns about this release |
Previous Message | Tom Lane | 2001-12-18 19:53:53 | Re: problems with table corruption continued |